/** * (non-PHPdoc) * @see getPartialSource() in parent * * @param string $partialName The name of the partial * @throws InvalidTemplateResourceException * @throws \TYPO3\CMS\Core\Package\Exception * @return string the full path which should be used. The path definitely exists. */ protected function getPartialSource($partialName) { /** * As in 1.3.0 resolving was part of this method we had to overwrite the complete method * This is not longer necessary in Version 1.4.0 */ if (substr(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getExtensionVersion('fluid'), 0, 3) == '1.4') { return parent::getPartialSource($partialName); } $paths = $this->expandGenericPathPattern($this->partialPathAndFilenamePattern, true, true); $paths[] = $this->getPartialPathAndFilename($partialName); $found = false; foreach ($paths as &$partialPathAndFilename) { $partialPathAndFilename = str_replace('@partial', $partialName, $partialPathAndFilename); if (file_exists($partialPathAndFilename)) { $found = true; break; } } if (!$found) { throw new InvalidTemplateResourceException('The template files "' . implode('", "', $paths) . '" could not be loaded.', 1225709595); } $partialSource = file_get_contents($partialPathAndFilename); if ($partialSource === false) { throw new InvalidTemplateResourceException('"' . $partialPathAndFilename . '" is not a valid template resource URI.', 1257246929); } return $partialSource; }