class TemplateProcessor (View source)

The main template processor.

Properties

private $Automad The main Automad instance.
private $featureProcessors An array of all existing feature processor instances.
private $Runtime The Runtime instance.

Methods

__construct(Automad $Automad, Runtime $Runtime, ContentProcessor $ContentProcessor)

The template processor constructor.

string
process(string $template, string $directory, bool $collectSnippetDefinitions)

The main template render process basically applies all feature processors to the rendered template.

array
initFeatureProcessors()

Create instances of all existing feature processors and bundle them in an array.

Details

__construct(Automad $Automad, Runtime $Runtime, ContentProcessor $ContentProcessor)

The template processor constructor.

Parameters

Automad $Automad
Runtime $Runtime
ContentProcessor $ContentProcessor

string process(string $template, string $directory, bool $collectSnippetDefinitions)

The main template render process basically applies all feature processors to the rendered template.

Note that the $collectSnippetDefinitions parameter controls whether snippets are added to the snippet collection in order to enable basic inheritance.

Parameters

string $template
string $directory
bool $collectSnippetDefinitions

Return Value

string the processed template

private array initFeatureProcessors()

Create instances of all existing feature processors and bundle them in an array.

Return Value

array the array of feature processor instances