/** * @param string $theme * @return string * @throws \TYPO3\CMS\Extbase\Mvc\Exception\NoSuchArgumentException */ public function render($theme) { $pageId = intval(GeneralUtility::_GET('id')); $themeOfPage = $this->themeRepository->findByPageOrRootline($pageId); if ($themeOfPage !== NULL && $themeOfPage->getExtensionName() === $theme) { return $this->renderThenChild(); } return $this->renderElseChild(); }
/** * renders the given theme * * @return void */ public function indexAction() { $this->templateName = $this->evaluateTypoScript('plugin.tx_themes.settings.templateName'); $templateFile = $this->getTemplateFile(); if ($templateFile !== NULL) { $this->view->setTemplatePathAndFilename($templateFile); } $this->view->assign('templateName', $this->templateName); $this->view->assign('theme', $this->themeRepository->findByPageOrRootline($GLOBALS['TSFE']->id)); }
/** * renders the given theme. * * @return void */ public function indexAction() { $this->templateName = $this->evaluateTypoScript('plugin.tx_themes.settings.templateName'); $templateFile = $this->getTemplateFile(); if ($templateFile !== null) { $this->view->setTemplatePathAndFilename($templateFile); } $this->view->assign('templateName', $this->templateName); $frontendController = $this->getFrontendController(); $this->view->assign('theme', $this->themeRepository->findByPageOrRootline($frontendController->id)); // Get page data $pageArray = $this->pageRepository->getPage($frontendController->id); $pageArray['icon'] = ''; // Map page icon if (isset($pageArray['tx_themes_icon']) && $pageArray['tx_themes_icon'] != '') { $setup = $frontendController->tmpl->setup; $pageArray['icon'] = $setup['lib.']['icons.']['cssMap.'][$pageArray['tx_themes_icon']]; } $this->view->assign('page', $pageArray); $this->view->assign('data', $pageArray); $this->view->assign('TSFE', $frontendController); }
/** * activate a theme. * * @param string $theme * * @return void */ public function showThemeDetailsAction($theme = null) { $themeObject = $this->themeRepository->findByIdentifier($theme); $this->view->assign('theme', $themeObject); }
/** * @test */ public function findAllTypeTest() { $this->assertGreaterThanOrEqual('array', gettype($this->fixture->findAll()), 'themes does not contain an array of themes'); }