public function indexAction(NodeInterface $node = null)
{
$this->contentCache->flush();
$this->session->start();
$this->session->putData('__neosEnabled__', 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', $siteNode);
$this->view->assign('asyncModuleMapping', $this->transformAsyncModuleMapping());
$this->view->assign('legacyModuleMapping', $this->transformLegacyModuleMapping());
$this->view->assign('translations', $this->xliffService->getCachedJson(new Locale($this->userService->getInterfaceLanguage())));
return;
}
$this->redirectToUri($this->uriBuilder->uriFor('index', array(), 'Login', 'TYPO3.Neos'));
}