Cecil

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
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

$options

Configuration options for the step.

protected Builder::OPTIONS $options

$subset

protected mixed $subset = []

Methods

canProcess()

Method to know if the step can be processed.

public canProcess() : bool

If init() is used, true by default.

Return values
bool

getName()

Returns the step name.

public getName() : string
Return values
string

init()

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>

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
throws
RuntimeException
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
Return values
Collection
 
On this page

Search results