lithium\template\View::$_steps
The list of available rendering steps. Each step contains instructions for how to render one
piece of a multi-step view rendering. The View
class combines multiple steps into
processes to create the final output.
Each step is named by its key in the $_steps
array, and can have the following options:
'path'
string: Indicates the set of paths to use when loading templates.'conditions'
mixed: Make the step dependent on a value being present, or on some other arbitrary condition. If a'conditions'
is a string, it indicates that a key with that name must be present in the$options
passed torender()
, and must be set to a non-empty value. If a closure, it will be executed with the rendering parameters, and must returntrue
orfalse
. In either case, if the condition is satisfied, the step is processed. Otherwise, it is skipped. See the_conditions()
method for more information.'capture'
array: If specified, allows the results of this rendering step to be assigned to a template variable used in subsequent steps, or to the templating context for use in subsequent steps. If can be specified in the form ofarray('context' => '<var-name>')
orarray('data' => '<var-name>')
. If the'context'
key is used, the results are captured to the rendering context. Likewise with the'data'
key, results are captured to a template variable.'multi'
boolean: If set totrue
, the rendering parameter matching the name of this step can be an array containing multiple values, in which case this step is executed multiple times, once for each value of the array.
Source
protected $_steps = array(
'template' => array('path' => 'template', 'capture' => array('context' => 'content')),
'layout' => array(
'path' => 'layout', 'conditions' => 'layout', 'multi' => true, 'capture' => array(
'context' => 'content'
)
),
'element' => array('path' => 'element')
);