-
Stops the content capture and save the content in the slot.
-
(string) get_component ($moduleName, $componentName, $vars = array())
Browse code
| $moduleName |
module name
|
| $componentName |
component name
|
| $vars |
variables to be made accessible to the component
|
Evaluates and returns a component.
The syntax is similar to the one of include_component.
Example:
echo get_component('mymodule', 'mypartial', array('myvar' => 12345));
returns result of the component execution
-
(string) get_component_slot ($name, $vars = array())
Browse code
| $name |
slot name
|
| $vars |
variables to be made accessible to the component
|
Evaluates and returns a component slot.
The syntax is similar to the one of include_component_slot.
Example:
echo get_component_slot('sidebar', array('myvar' => 12345));
returns result of the component execution
-
(string) get_partial ($templateName, $vars = array())
Browse code
| $templateName |
partial name
|
| $vars |
variables to be made accessible to the partial
|
Evaluates and returns a partial.
The syntax is similar to the one of include_partial
Example:
echo get_partial('mypartial', array('myvar' => 12345));
returns result of the partial execution
-
(string) get_slot ($name)
Browse code
Evaluates and returns a slot.
Example:
echo get_slot('navigation');
returns content of the slot
-
(bool) has_component_slot ($name)
Browse code
Returns true if component slot exists.
returns true if component slot exists, false otherwise
-
(bool) has_slot ($name)
Browse code
Returns true if the slot exists.
returns true, if the slot exists
-
include_component ($moduleName, $componentName, $vars = array())
Browse code
| $moduleName |
module name
|
| $componentName |
component name
|
| $vars |
variables to be made accessible to the component
|
Evaluates and echoes a component.
For a variable to be accessible to the component and its partial, it has to be passed in the third argument.
Example:
include_component('mymodule', 'mypartial', array('myvar' => 12345));
-
include_component_slot ($name, $vars = array())
Browse code
| $name |
slot name
|
| $vars |
variables to be made accessible to the component
|
Evaluates and echoes a component slot.
The component name is deduced from the definition of the view.yml For a variable to be accessible to the component and its partial, it has to be passed in the second argument.
Example:
include_component_slot('sidebar', array('myvar' => 12345));
-
include_partial ($templateName, $vars = array())
Browse code
| $templateName |
partial name
|
| $vars |
variables to be made accessible to the partial
|
Evaluates and echoes a partial.
The partial name is composed as follows: 'mymodule/mypartial'. The partial file name is _mypartial.php and is looked for in modules/mymodule/templates/. If the partial name doesn't include a module name, then the partial file is searched for in the caller's template/ directory. If the module name is 'global', then the partial file is looked for in myapp/templates/. For a variable to be accessible to the partial, it has to be passed in the second argument.
Example:
include_partial('mypartial', array('myvar' => 12345));
-
Evaluates and echoes a slot.
Example:
include_slot('navigation');
-
slot ($name, $value = null)
Browse code
| $name |
slot name
|
| $value |
The slot content
|
Begins the capturing of the slot.
-
_call_component ($moduleName, $componentName, $vars)
Browse code
| $moduleName |
|
| $componentName |
|
| $vars |
|