userId = $UserId; $this->appName = $AppName; $this->eventDispatcher = $eventDispatcher; $this->initialState = $initialState; $this->userSession = $userSession; $this->config = $config; } /** * @NoAdminRequired * @NoCSRFRequired */ public function main() { $user = $this->userSession->getUser(); if (is_null($user)) { return null; } Util::addScript($this->appName, 'memories-main'); Util::addStyle($this->appName, 'custom-icons'); $this->eventDispatcher->dispatchTyped(new LoadSidebar()); $this->eventDispatcher->dispatchTyped(new LoadViewer()); $timelinePath = \OCA\Memories\Util::getPhotosPath($this->config, $user->getUid()); $this->initialState->provideInitialState('timelinePath', $timelinePath); $response = new TemplateResponse($this->appName, 'main'); return $response; } /** * @NoAdminRequired * @NoCSRFRequired */ public function folder() { return $this->main(); } }