Render extends AbstractStep
Render step. This step is responsible for rendering pages using Twig templates. It processes each page, applies the appropriate templates, and generates the final output formats. It also handles subsets of pages if specified, and adds global variables to the renderer. The rendered pages are then stored in the builder's pages collection for further processing or output.
Table of Contents
Constants
- TMP_DIR = '.cecil'
Properties
- $builder : Builder
- $canProcess : bool
- $config : Config
- $options : Builder::OPTIONS
- $canProcess : bool
- Configuration options for the step.
- $subset : mixed
Methods
- __construct() : mixed
- StepInterface constructor.
- canProcess() : bool
- Method to know if the step can be processed.
- getName() : string
- Returns the step name.
- init() : void
- This method is called before the step is processed to initialize the step with necessary options and to determine if it can be executed.
- process() : void
- Process implementation.
- addGlobals() : mixed
- Adds global variables.
- getAllLayoutsPaths() : array<string|int, mixed>
- Returns an array of layouts directories.
- getAlternates() : array<string|int, mixed>
- Get alternates.
- getOutputFormats() : array<string|int, mixed>
- Get available output formats.
- getTranslations() : Collection
- Returns the collection of translated pages for a given page.
Constants
TMP_DIR
public
mixed
TMP_DIR
= '.cecil'
Properties
$builder
protected
Builder
$builder
$canProcess
protected
bool
$canProcess
= false
$config
protected
Config
$config
$options
Configuration options for the step.
protected
Builder::OPTIONS
$options
$subset
protected
mixed
$subset
= []
Methods
__construct()
StepInterface constructor.
public
__construct(Builder $builder) : mixed
Parameters
- $builder : Builder
canProcess()
Method to know if the step can be processed.
public
canProcess() : bool
If init() is used, true by default.
Return values
boolgetName()
Returns the step name.
public
getName() : string
Return values
stringinit()
This method is called before the step is processed to initialize the step with necessary options and to determine if it can be executed.
public
init(array<string|int, mixed> $options) : void
Parameters
- $options : array<string|int, mixed>
process()
Process implementation.
public
process() : void
Tags
addGlobals()
Adds global variables.
protected
addGlobals() : mixed
getAllLayoutsPaths()
Returns an array of layouts directories.
protected
getAllLayoutsPaths() : array<string|int, mixed>
Return values
array<string|int, mixed>getAlternates()
Get alternates.
protected
getAlternates(array<string|int, mixed> $formats) : array<string|int, mixed>
Parameters
- $formats : array<string|int, mixed>
Return values
array<string|int, mixed>getOutputFormats()
Get available output formats.
protected
getOutputFormats(Page $page) : array<string|int, mixed>
Parameters
- $page : Page
Tags
Return values
array<string|int, mixed>getTranslations()
Returns the collection of translated pages for a given page.
protected
getTranslations(Page $refPage) : Collection
Parameters
- $refPage : Page