getBlockList()

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

概要

require_once 'HTML/Template/Sigma.php';

array HTML_Template_Sigma::getBlockList ([string $parent = '__global__' [, bool $recursive = FALSE]])

説明

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.

パラメータ

string $parent

parent block name

boolean $recursive

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

返り値

return a list of child blocks

参照

see HTML_Template_Sigma::blockExists(), HTML_Template_Sigma::getPlaceholderList()

例外・エラー

表 40-1PEAR_Error の値

Error codeError messageReasonSolution
SIGMA_BLOCK_NOT_FOUNDCannot find block '$parent'There is no block $parent in the templateCheck the block name spelling, check whether you added all the necessary blocks to the template

注意

この関数は、スタティックにコールする ことはできません。