BlockExample extends Block
The Block class provides methods to provide blocks without utilizing the Backdrop hook system. The methods provided here allow you to define the labels, forms, validation, and display of blocks.
Blocks defined by extending the Block class cannot be "_altered" in the traditional manner, however this class can be extended, and the methods overridden, to introduce new functionality.
Hierarchy
- class LayoutHandler
- class Block
- class BlockExample
- class Block
Expanded class hierarchy of BlockExample
File
- modules/
examples/ block_example/ block_example.inc, line 13
Members
Name | Modifiers | Type | Description |
---|---|---|---|
BlockExample:: |
function |
Sets title text on draggable block panel in Layout builder. Overrides Block:: |
|
BlockExample:: |
function |
Sets block subject on block view. Overrides Block:: |
|
BlockExample:: |
function |
Returns the rendered content of this block. Overrides Block:: |
|
BlockExample:: |
function |
Builds the block's configuration form. Overrides Block:: |
|
BlockExample:: |
function |
Validates the form settings. Overrides Block:: |
|
BlockExample:: |
function |
Submit handler to save the form settings. Overrides Block:: |
|
Block:: |
function |
Create a new Block object. Overrides LayoutHandler:: |
|
Block:: |
function | Return a preview for this block. | |
Block:: |
function | Clone this block to give it a new UUID but the same configuration. | |
Block:: |
function |
Convert the configuration of this block to an array for storage. Overrides LayoutHandler:: |
|
Block:: |
function | Get a list of all required context plugin names for this block. | |
Block:: |
function | Set the contexts for this block. | |
Block:: |
function | Check if this block should be shown based on current contexts. | |
Block:: |
function | Return the block info for this block, as provided by hook_block_info(). | |
Block:: |
function | Allows an array of "child blocks" for display in the "Add Block" dialog. | |
Block:: |
function | Return a fieldset listing any visibility conditions set for this block. | |
Block:: |
function | Do any processing prior to getTitle() and getContent() being called. | |
LayoutHandler:: |
function | Assemble a human-readable label of this object. |