/** * @return string */ public function indexAction() { $this->view->assign('grid', $this->grid); $this->view->assign('row', $this->row); $paths = $this->configurationService->getViewConfigurationForExtensionName('flux'); $templateRootPath = TRUE === isset($paths['templateRootPath']) ? $paths['templateRootPath'] : NULL; $templatePathAndFilename = ResolveUtility::resolveWidgetTemplateFileBasedOnTemplateRootPathAndEnvironment($templateRootPath); $this->view->setTemplatePathAndFilename($templatePathAndFilename); }
/** * @param string $pattern Pattern to be resolved * @param boolean $bubbleControllerAndSubpackage if TRUE, then we successively split off parts from "@controller" and "@subpackage" until both are empty. * @param boolean $formatIsOptional if TRUE, then half of the resulting strings will have ."@format" stripped off, and the other half will have it. * @return array unix style path */ protected function expandGenericPathPattern($pattern, $bubbleControllerAndSubpackage, $formatIsOptional) { $extensionKey = $this->controllerContext->getRequest()->getControllerExtensionKey(); $configurations = $this->configurationService->getViewConfigurationForExtensionName($extensionKey); $pathOverlayConfigurations = $this->buildPathOverlayConfigurations($configurations); $paths = parent::expandGenericPathPattern($pattern, $bubbleControllerAndSubpackage, $formatIsOptional); foreach ($pathOverlayConfigurations as $overlayPaths) { if (FALSE === empty($overlayPaths['templateRootPath'])) { $templateRootPath = $overlayPaths['templateRootPath']; $this->setTemplateRootPath($templateRootPath); } if (FALSE === empty($overlayPaths['partialRootPath'])) { $partialRootPath = $overlayPaths['partialRootPath']; $this->setPartialRootPath($partialRootPath); } if (FALSE === empty($overlayPaths['layoutRootPath'])) { $layoutRootPath = $overlayPaths['layoutRootPath']; $this->setLayoutRootPath($layoutRootPath); } $subset = parent::expandGenericPathPattern($pattern, $bubbleControllerAndSubpackage, $formatIsOptional); $paths = array_merge($paths, $subset); } $paths = array_unique($paths); $paths = array_reverse($paths); $paths = $this->trimPathStringRecursive($paths); return $paths; }
/** * @return string */ public function indexAction() { $workspaceVersionOfRecord = $this->workspacesAwareRecordService->getSingle('tt_content', '*', $this->row['uid']); $this->view->assign('grid', $this->grid); $this->view->assign('row', $workspaceVersionOfRecord); $this->view->assign('colPosFluxContent', ContentService::COLPOS_FLUXCONTENT); $paths = $this->configurationService->getViewConfigurationForExtensionName('flux'); $templateRootPath = TRUE === isset($paths['templateRootPath']) ? $paths['templateRootPath'] : NULL; $templatePathAndFilename = ResolveUtility::resolveWidgetTemplateFileBasedOnTemplateRootPathAndEnvironment($templateRootPath); $this->view->setTemplatePathAndFilename($templatePathAndFilename); }
/** * @param array $row * @return array */ public function getTemplatePaths(array $row) { $paths = $this->templatePaths; if (FALSE === is_array($paths)) { $extensionKey = $this->getExtensionKey($row); $extensionKey = ExtensionNamingUtility::getExtensionKey($extensionKey); if (FALSE === empty($extensionKey)) { $paths = $this->configurationService->getViewConfigurationForExtensionName($extensionKey); } } if (TRUE === is_array($paths)) { $paths = PathUtility::translatePath($paths); } return $paths; }
/** * @param array $row * @return array */ public function getTemplatePaths(array $row) { $paths = $this->templatePaths; $extensionKey = $this->getExtensionKey($row); $extensionKey = ExtensionNamingUtility::getExtensionKey($extensionKey); if (FALSE === is_array($paths)) { $extensionKey = $this->getExtensionKey($row); if (FALSE === empty($extensionKey) && TRUE === ExtensionManagementUtility::isLoaded($extensionKey)) { $paths = $this->configurationService->getViewConfigurationForExtensionName($extensionKey); } } if (NULL !== $paths && FALSE === is_array($paths)) { $this->configurationService->message('Template paths resolved for "' . $extensionKey . '" was not an array.', GeneralUtility::SYSLOG_SEVERITY_WARNING); $paths = NULL; } if (NULL === $paths) { $extensionKey = $this->getExtensionKey($row); if (FALSE === empty($extensionKey) && TRUE === ExtensionManagementUtility::isLoaded($extensionKey)) { $paths = array(ExtensionManagementUtility::extPath($extensionKey, 'Resources/Private/Templates/'), ExtensionManagementUtility::extPath($extensionKey, 'Resources/Private/Partials/'), ExtensionManagementUtility::extPath($extensionKey, 'Resources/Private/Layouts/')); } else { $paths = array(); } } if (TRUE === is_array($paths)) { $paths = PathUtility::translatePath($paths); } return $paths; }