TemplateRenderer
Class.
Renders the Twig templates of a framework instance (theme, child theme or plugin).
Template names are paths relative to the src/ directory of each level,
including the extension (e.g. Component/Button.twig). Names without a
namespace are looked up in the search paths of the instance, then in the
framework, so a higher level overrides a template by providing the same path:
- theme: child theme
overrides/{slug}/→ themesrc/→ framework, - child theme: child theme
src/→ framework, - plugin: child theme
overrides/{slug}/→ themeoverrides/{slug}/→ pluginsrc/→ framework.@theme/…(themes, child themes),@plugin/…(plugins) and@framework/…address exactly one level and cannot be overridden.
Names starting with the template prefix of a plugin declared in
extra.wp-app-framework.template-plugins, or in a child theme of its parent
theme, call the public template functions and filters of that plugin or theme.
Provided by the framework at runtime; services receive it through their constructor. The Twig environment is created on the first render.
Constants
Methods
render()
Renders a template.
Returns string