Interface required by shebang handlers. More...
Static Public Member Functions | |
static | createFromShebang ($block_config, $shebang_config, Context $context, $block_type) |
Factory method to create a proxy block (usualy self). More... | |
Interface required by shebang handlers.
Shebang handler is usualy proxy block itself, it only needs few extra methods.
If block storage returns something without shebang specified, default shebang 'proxy' is assumed. This is for compatibility with old blocks.
/
|
static |
Factory method to create a proxy block (usualy self).
Called by CascadeController::createBlockInstance() when block storage returns configuration instead of block.
$block_config | is configuration of the new block. |
$shebang_config | is configuration of the shebang (from core.json.php). |
$context | is Context of creating block – not the context in which will be block executed. |
$block_type | is type of the block (ID is not known yet). |
Example: Typical implementation: return new self();
Implemented in ProxyBlock.