eZTemplateBlockFunction Class Reference
[Template functions]
Advanced block handling.
More...
List of all members.
|
Public Methods |
| eZTemplateBlockFunction ($blockName= 'set-block',$appendBlockName= 'append-block',$onceName= 'run-once') |
| functionList () |
| process (&$tpl,&$textElements,$functionName,$functionChildren,$functionParameters,$functionPlacement,$rootNamespace,$currentNamespace) |
| placementKey ($placement) |
| hasPlacementKey ($key) |
| registerPlacementKey ($key,$placement) |
| hasChildren () |
Private Attributes |
| Name |
Detailed Description
Advanced block handling.
set-block Renders all it's children as text and sets it as a template variable. This is useful for allowing one template to return multiple text portions, for instance an email template could set subject as a block and return the rest as body.
{set-block name=Space scope=global variable=text}
{$item} - {$item2}
{/set-block}
append-block Similar to set-block but will make the variable an array where each append-block adds an item.
{append-block scope=global variable=extra_header_data}
<script language=jscript src={"/extension/xmleditor/dhtml/ezeditor.js"|ezroot}></script>
<link rel="stylesheet" type="text/css" href={"/extension/xmleditor/dhtml/toolbar.css"|ezroot}>
{/append-block}
run-once Makes sure that the block is run only once.
{run-once}
<p>This appears only one time</p>
{/run-once}
Definition at line eztemplateblockfunction.php.
Constructor & Destructor Documentation
eZTemplateBlockFunction::eZTemplateBlockFunction |
( |
$ |
blockName = 'set-block', |
|
|
$ |
appendBlockName = 'append-block', |
|
|
$ |
onceName = 'run-once' |
|
) |
|
|
Member Function Documentation
eZTemplateBlockFunction::functionList |
( |
|
) |
|
|
|
Returns an array containing the name of the block function, default is "block". The name is specified in the constructor.
Definition at line eztemplateblockfunction.php. |
eZTemplateBlockFunction::hasChildren |
( |
|
) |
|
|
eZTemplateBlockFunction::hasPlacementKey |
( |
$ |
key |
) |
|
|
eZTemplateBlockFunction::placementKey |
( |
$ |
placement |
) |
|
|
|
Generates an md5 key from the start, stop and file of the template function and returns it. - Returns:
-
false if the key could not be made.
Definition at line eztemplateblockfunction.php.
Referenced by process(). |
eZTemplateBlockFunction::process |
( |
&$ |
tpl, |
|
|
&$ |
textElements, |
|
|
$ |
functionName, |
|
|
$ |
functionChildren, |
|
|
$ |
functionParameters, |
|
|
$ |
functionPlacement, |
|
|
$ |
rootNamespace, |
|
|
$ |
currentNamespace |
|
) |
|
|
eZTemplateBlockFunction::registerPlacementKey |
( |
$ |
key, |
|
|
$ |
placement |
|
) |
|
|
Member Data Documentation
eZTemplateBlockFunction::Name [private]
|
|
The documentation for this class was generated from the following file:
|