Cecil

Create extends AbstractStep

Create menus step.

This step is responsible for creating menus based on the configuration and the pages defined in the site. It initializes a collection of menus for each language, adds a default "main" menu, and processes the configuration to add, remove, or replace menu entries. It also creates menus from pages that have a menu variable defined, allowing for dynamic menu generation based on the content of the site.

Table of Contents

Properties

$builder  : Builder
$canProcess  : bool
$config  : Config
$menus  : array<string|int, mixed>
$options  : Builder::OPTIONS
Configuration options for the step.

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.
createMenusFromPages()  : void
Create menus from pages' `menu` variable.

Properties

$menus

protected array<string|int, mixed> $menus

$options

Configuration options for the step.

protected Builder::OPTIONS $options

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>

createMenusFromPages()

Create menus from pages' `menu` variable.

protected createMenusFromPages() : void
 
On this page

Search results