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

getLayoutPathAndFilename() public method

In case a layout has already been set with setLayoutPathAndFilename(), this method returns that path, otherwise a path and filename will be resolved using the layoutPathAndFilenamePattern.
public getLayoutPathAndFilename ( string $layoutName = 'Default' ) : string
$layoutName string Name of the layout to use. If none given, use "Default"
return string Path and filename of layout files
    public function getLayoutPathAndFilename($layoutName = 'Default')
    {
        if (isset($this->options['layoutPathAndFilename'])) {
            return $this->options['layoutPathAndFilename'];
        }
        $layoutName = ucfirst($layoutName);
        $paths = $this->getLayoutRootPaths();
        if (isset($this->options['layoutPathAndFilenamePattern'])) {
            $paths = $this->expandGenericPathPattern($this->options['layoutPathAndFilenamePattern'], array_merge($this->patternReplacementVariables, ['layout' => $layoutName]), true, true);
        }
        foreach ($paths as $layoutPathAndFilename) {
            if (is_file($layoutPathAndFilename)) {
                return $layoutPathAndFilename;
            }
        }
        throw new Exception\InvalidTemplateResourceException('The layout files "' . implode('", "', $paths) . '" could not be loaded.', 1225709595);
    }