/** * Displays the backend interface * * @param NodeInterface $node The node that will be displayed on the first tab * @return void */ public function indexAction(NodeInterface $node = null) { $this->contentCache->flush(); $this->session->start(); $this->session->putData('__cheEnabled__', true); if ($user = $this->userService->getBackendUser()) { $workspaceName = $this->userService->getPersonalWorkspaceName(); $contentContext = $this->createContext($workspaceName); $contentContext->getWorkspace(); $this->persistenceManager->persistAll(); $siteNode = $contentContext->getCurrentSiteNode(); if ($node === null) { $node = $siteNode; } $this->view->assign('user', $user); $this->view->assign('documentNode', $node); $this->view->assign('site', $node); $this->view->assign('translations', $this->xliffService->getCachedJson(new Locale($this->userService->getInterfaceLanguage()))); return; } $this->redirectToUri($this->uriBuilder->uriFor('index', array(), 'Login', 'TYPO3.Neos')); }
/** * Returns the cached json array with the xliff labels * * @param string $locale * @return string */ public function xliffAsJsonAction($locale) { $this->response->setHeader('Content-Type', 'application/json'); return $this->xliffService->getCachedJson(new Locale($locale)); }
/** * Returns the cached json array with the xliff labels * * @return string */ public function getXliffAsJsonAction() { $this->response->setHeader('Content-Type', 'application/json'); $locale = new Locale($this->userService->getInterfaceLanguage()); return $this->xliffService->getCachedJson($locale); }
/** * @return string The current cache version identifier */ public function render() { return $this->xliffService->getCacheVersion(); }