block_interface
interface block_interface
Contract for renderable UI blocks within the framework.
Implementations prepare data for templates and expose helpers for rendering and HTML attributes used by block drivers.
Methods
Compute and store the block title.
Returns the human-readable title of the block.
Main computation function.
Returns the processed block data, with memoization.
Defines an HTML attribute for the block output wrapper.
Render the block using the associated widget + template system.
Details
at line 31
void
set_title()
Compute and store the block title.
at line 39
string
get_title()
Returns the human-readable title of the block.
Should call set_title() lazily if not already set.
at line 47
array
process_content()
Main computation function.
Should return all data needed by the template.
at line 54
array
get_content()
Returns the processed block data, with memoization.
at line 62
void
set_attribute(string $key, string $value)
Defines an HTML attribute for the block output wrapper.
at line 69
string
render()
Render the block using the associated widget + template system.