BlockProvidersService
extends Component
in package
Table of Contents
- EVENT_REGISTER_BLOCK_PROVIDERS = 'block_providers'
- Register block providers event key
- $_providers : array<string|int, BlockProviderInterface>
- getAll() : array<string|int, BlockProviderInterface>
- Get all block providers
- getByHandle() : BlockProviderInterface
- Get provider by handle
- has() : bool
- Is a provider's handle defined
- reset() : mixed
- Reset internal cache, used for tests only
- register() : mixed
- Registers block providers
Constants
EVENT_REGISTER_BLOCK_PROVIDERS
Register block providers event key
public
string
EVENT_REGISTER_BLOCK_PROVIDERS
= 'block_providers'
Properties
$_providers
protected
array<string|int, BlockProviderInterface>
$_providers
Methods
getAll()
Get all block providers
public
getAll([bool $asArrays = false ]) : array<string|int, BlockProviderInterface>
Parameters
- $asArrays : bool = false
Return values
array<string|int, BlockProviderInterface> —getByHandle()
Get provider by handle
public
getByHandle(string $handle) : BlockProviderInterface
Parameters
- $handle : string
Tags
Return values
BlockProviderInterface —has()
Is a provider's handle defined
public
has(string $handle) : bool
Parameters
- $handle : string
Return values
bool —reset()
Reset internal cache, used for tests only
public
reset() : mixed
Return values
mixed —register()
Registers block providers
protected
register() : mixed