Craft Themes (3.x)

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()  : 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

fields()

public fields() : mixed
Tags
inheritDoc
Return values
mixed

getDefinedBlocks()

Get all defined blocks classes

public getDefinedBlocks() : array<string|int, string>
Tags
inheritDoc
Return values
array<string|int, string>

Search results