Convert extends AbstractStep
Convert step. This step is responsible for converting pages from their source format (i.e. Markdown) to HTML, applying front matter processing, and ensuring that the pages are ready for rendering. It handles both published and draft pages, depending on the build options.
Table of Contents
Properties
- $builder : Builder
- $canProcess : bool
- $config : Config
- $options : Builder::OPTIONS
- $canProcess : bool
- Configuration options for the step.
Methods
- __construct() : mixed
- StepInterface constructor.
- canProcess() : bool
- Method to know if the step can be processed.
- convertPage() : Page
- Converts page content: - front matter to PHP array - body to HTML.
- 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.
Properties
$builder
protected
Builder
$builder
$canProcess
protected
bool
$canProcess
= false
$config
protected
Config
$config
$options
Configuration options for the step.
protected
Builder::OPTIONS
$options
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
boolconvertPage()
Converts page content: - front matter to PHP array - body to HTML.
public
convertPage(Builder $builder, Page $page[, string|null $format = null ][, ConverterInterface|null $converter = null ]) : Page
Parameters
- $builder : Builder
- $page : Page
- $format : string|null = null
- $converter : ConverterInterface|null = null
Tags
Return values
PagegetName()
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