public function getPageConfiguration($extensionName = null) { if (null !== $extensionName && true === empty($extensionName)) { // Note: a NULL extensionName means "fetch ALL defined collections" whereas // an empty value that is not null indicates an incorrect caller. Instead // of returning ALL paths here, an empty array is the proper return value. // However, dispatch a debug message to inform integrators of the problem. $this->message('Template paths have been attempted fetched using an empty value that is NOT NULL in ' . get_class($this) . '. This indicates a potential problem with your TypoScript configuration - a ' . 'value which is expected to be an array may be defined as a string. This error is not fatal but may ' . 'prevent the affected collection (which cannot be identified here) from showing up', GeneralUtility::SYSLOG_SEVERITY_NOTICE); return []; } if (null !== $extensionName) { return $this->getViewConfigurationForExtensionName($extensionName); } $configurations = []; $registeredExtensionKeys = Core::getRegisteredProviderExtensionKeys('Page'); foreach ($registeredExtensionKeys as $registeredExtensionKey) { $configurations[$registeredExtensionKey] = $this->getViewConfigurationForExtensionName($registeredExtensionKey); } return $configurations; }
/** * @param array $row * @return array */ public function getTemplatePaths(array $row) { $extensionName = $this->getExtensionKey($row); $paths = $this->configurationService->getPageConfiguration($extensionName); if (TRUE === is_array($paths) && FALSE === empty($paths)) { $paths = PathUtility::translatePath($paths); return $paths; } return parent::getTemplatePaths($row); }