getBlockList()

getBlockList() – Returns a list of blocks within a template.

Synopsis

require_once 'HTML/Template/Sigma.php';

array HTML_Template_Sigma::getBlockList ( string $parent = '__global__' , bool $recursive = false )

Description

Returns a list of blocks within a template.

If $recursive is FALSE, it returns just a 'flat' array of $parent's direct subblocks. If $recursive is TRUE, it builds a tree of template blocks using $parent as root. Tree structure is compatible with PEAR::Tree's Memory_Array driver.

Parameter

string $parent

parent block name

boolean $recursive

whether to return a tree of child blocks (TRUE) or a 'flat' array (FALSE)

Return value

return a list of child blocks

Throws

Possible PEAR_Error values
Error code Error message Reason Solution
SIGMA_BLOCK_NOT_FOUND Cannot find block '$parent' There is no block $parent in the template Check the block name spelling, check whether you added all the necessary blocks to the template

Note

This function can not be called statically.

Returns a block with all replacements done. (Previous) Returns the current block name (Next)
Last updated: Sat, 16 Feb 2019 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

There are no user contributed notes for this page.