FilesystemLoader
class FilesystemLoader extends FilesystemLoader
FilesystemLoader extends the default Twig filesystem loader to work with the Symfony paths and template references.
Properties
protected | $locator | ||
protected | $parser |
Methods
__construct(FileLocatorInterface $locator, TemplateNameParserInterface $parser, string $rootPath = null)
No description
exists($name)
{@inheritdoc}
string
findTemplate(string|TemplateReferenceInterface $template, bool $throw = true)
Returns the path to the template file.
Details
__construct(FileLocatorInterface $locator, TemplateNameParserInterface $parser, string $rootPath = null)
protected string
findTemplate(string|TemplateReferenceInterface $template, bool $throw = true)
Returns the path to the template file.
The file locator is used to locate the template when the naming convention is the symfony one (i.e. the name can be parsed). Otherwise the template is located using the locator from the twig library.