Neos\FluidAdaptor\View\TemplatePaths::getPartialPathAndFilename PHP Method

getPartialPathAndFilename() public method

Resolve the partial path and filename based on $this->options['partialPathAndFilenamePattern'].
public getPartialPathAndFilename ( string $partialName ) : string
$partialName string The name of the partial
return string the full path which should be used. The path definitely exists.
    public function getPartialPathAndFilename($partialName)
    {
        $patternReplacementVariables = array_merge($this->patternReplacementVariables, ['partial' => $partialName]);
        if (strpos($partialName, ':') !== false) {
            list($packageKey, $actualPartialName) = explode(':', $partialName);
            $package = $this->packageManager->getPackage($packageKey);
            $patternReplacementVariables['package'] = $packageKey;
            $patternReplacementVariables['packageResourcesPath'] = $package->getResourcesPath();
            $patternReplacementVariables['partial'] = $actualPartialName;
        }
        $paths = $this->expandGenericPathPattern($this->options['partialPathAndFilenamePattern'], $patternReplacementVariables, true, true);
        foreach ($paths as $partialPathAndFilename) {
            if (is_file($partialPathAndFilename)) {
                return $partialPathAndFilename;
            }
        }
        throw new Exception\InvalidTemplateResourceException('The partial files "' . implode('", "', $paths) . '" could not be loaded.', 1225709595);
    }