addBlock()

addBlock()

addBlock() -- Adds a block to the template

Description

Adds a block to the template changing a variable placeholder to a block placeholder. This means that a new block will be integrated into the template in place of a variable placeholder. The variable placeholder will be removed and the new block will behave in the same way as if it was inside the original template.

The block content must not start with <!-- BEGIN blockname --> and end with <!-- END blockname -->, if it does the error will be thrown.

Parameter

string $placeholder

name of the variable placeholder, the name must be unique within the template.

string $block

name of the block to be added

string $template

content of the block

Return value

return SIGMA_OK on success, error object on failure

Note

This function can not be called statically.

© Copyright 2003-2023 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.