Save extends AbstractStep
Save assets step. This step is responsible for saving assets to the output directory. It copies files from the cache to the output directory, ensuring that assets are available for the final build. If the cache is disabled, it clears the cache directory before processing assets.
Table of Contents
Properties
- $builder : Builder
- $cache : Cache
- $cacheKey : string
- $canProcess : bool
- $config : Config
- $options : Builder::OPTIONS
- $cache : Cache
- 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
- {@inheritdoc} Note: a file from `static/` with the same name will NOT be overridden.
- clearCacheIfDisabled() : void
- Deletes cache directory, if cache is disabled.
Properties
$builder
protected
Builder
$builder
$cache
protected
Cache
$cache
$cacheKey
protected
string
$cacheKey
$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
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()
{@inheritdoc} Note: a file from `static/` with the same name will NOT be overridden.
public
process() : void
Tags
clearCacheIfDisabled()
Deletes cache directory, if cache is disabled.
private
clearCacheIfDisabled() : void