MetadataTemplateResolver
FinalYes
Finds the template with which an extension renders a metadata object.
Extensions declare the metadata keys they handle. The template of a key is found by convention in the Twig
namespace of the extension: @<alias>/metadata/<key>.html.twig.
Table of Contents
Properties
- $extensions : array
- $logger : LoggerInterface
Methods
- __construct() : mixed
- resolve() : string|null
Properties
$extensions read-only
private
array
$extensions
$logger read-only
private
LoggerInterface
$logger
Methods
__construct()
public
__construct(array<string, array{path: string, keys: string[]}> $extensions, LoggerInterface $logger) : mixed
Parameters
- $extensions : array<string, array{path: string, keys: string[]}>
-
indexed by the alias of the extension
- $logger : LoggerInterface
resolve()
public
resolve(Metadata $metadata, string $nodeName, LoaderInterface $loader) : string|null
Parameters
- $metadata : Metadata
- $nodeName : string
- $loader : LoaderInterface