backend->getCalendarsForUser("principals/users/$userId"); $this->register($cm, $calendars); } /** * @param IManager $cm * @param array $calendars */ private function register(IManager $cm, array $calendars) { foreach ($calendars as $calendarInfo) { $calendar = new Calendar($this->backend, $calendarInfo, $this->l10n, $this->config, $this->logger); $cm->registerCalendar(new CalendarImpl( $calendar, $calendarInfo, $this->backend )); } } }