BlockProvider
extends Component
in package
implements
BlockProviderInterface
Base class for all block providers
Interfaces, Classes and Traits
- BlockProviderInterface
- A block provider, can define several blocks. Their blocks can be modified through events.
Table of Contents
- $_allDefinedBlocks : array<string|int, string>
- block classes defined by this provider, indexed by blocks handles
- $_definedBlocks : array<string|int, string>
- block classes defined by this provider
- createBlock() : BlockInterface
- Get a block instance
- fields() : array<string|int, mixed>
- getBlocks() : array<string|int, BlockInterface>
- Get all defined blocks as objects
- getDefinedBlocks() : array<string|int, string>
- Get all defined blocks classes
Properties
$_allDefinedBlocks
block classes defined by this provider, indexed by blocks handles
protected
array<string|int, string>
$_allDefinedBlocks
$_definedBlocks
block classes defined by this provider
protected
array<string|int, string>
$_definedBlocks
= []
Methods
createBlock()
Get a block instance
public
createBlock(string $handle) : BlockInterface
Parameters
- $handle : string
Tags
Return values
BlockInterface —fields()
public
fields() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —getBlocks()
Get all defined blocks as objects
public
getBlocks() : array<string|int, BlockInterface>
Tags
Return values
array<string|int, BlockInterface> —getDefinedBlocks()
Get all defined blocks classes
public
getDefinedBlocks() : array<string|int, string>