ContainerInterface
in
Interface for block containers.
Table of Contents
- get_block() : BlockInterface|null
- Get a block by ID.
- get_formatted_template() : array<string|int, mixed>
- Get the block configuration as a formatted template.
- get_root_template() : BlockTemplateInterface
- Get the root template that the block belongs to.
- remove_block() : mixed
- Removes a block from the container.
- remove_blocks() : mixed
- Removes all blocks from the container.
Methods
get_block()
Get a block by ID.
public
get_block(string $block_id) : BlockInterface|null
Parameters
- $block_id : string
-
The block ID.
Return values
BlockInterface|null —get_formatted_template()
Get the block configuration as a formatted template.
public
get_formatted_template() : array<string|int, mixed>
Return values
array<string|int, mixed> —get_root_template()
Get the root template that the block belongs to.
public
get_root_template() : BlockTemplateInterface
Return values
BlockTemplateInterface —remove_block()
Removes a block from the container.
public
remove_block(string $block_id) : mixed
Parameters
- $block_id : string
-
The block ID.
Tags
Return values
mixed —remove_blocks()
Removes all blocks from the container.
public
remove_blocks() : mixed