fetch( 'content', 'tree' )
Defined in kernel/content/function_definition.php; it calls eZContentFunctionCollection::fetchObjectTree() (kernel/content/ezcontentfunctioncollection.php).
Operation type: read.
Parameters
| Parameter | Type | Required | Default |
|---|---|---|---|
parent_node_id | integer | yes | |
sort_by | array | no | array() |
only_translated | bool | no | false |
language | string | no | false |
offset | integer | no | false |
limit | integer | no | false |
depth | integer | no | false |
depth_operator | integer | no | false |
class_id | integer | no | false |
attribute_filter | mixed | no | false |
extended_attribute_filter | mixed | no | false |
class_filter_type | string | no | false |
class_filter_array | array | no | false |
group_by | array | no | false |
main_node_only | bool | no | false |
ignore_visibility | bool | no | false |
limitation | array | no | null |
as_object | bool | no | null |
objectname_filter | string | no | null |
load_data_map | bool | no | null |
Example
In a template (the values are placeholders of each parameter's type):
def $result = fetch( 'content', 'tree', hash( 'parent_node_id', 1 ) )
{* with every parameter *}
{def $all = fetch( 'content', 'tree', hash( 'parent_node_id', 1,
'sort_by', array(),
'only_translated', true(),
'language', 'language',
'offset', 1,
'limit', 1,
'depth', 1,
'depth_operator', 1,
'class_id', 1,
'attribute_filter', $attribute_filter,
'extended_attribute_filter', $extended_attribute_filter,
'class_filter_type', 'class_filter_type',
'class_filter_array', array(),
'group_by', array(),
'main_node_only', true(),
'ignore_visibility', true(),
'limitation', array(),
'as_object', true(),
'objectname_filter', 'objectname_filter',
'load_data_map', true() ) )}In PHP, the same function through the function handler (lib/ezutils/classes/ezfunctionhandler.php):
$result = eZFunctionHandler::execute( 'content', 'tree', array( 'parent_node_id' => 1 ) );Related
Generated by ./console exp:help:examples from kernel/content/function_definition.php, kernel/content/ezcontentfunctioncollection.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.