fetch( 'section', 'object_list' )
Defined in kernel/section/function_definition.php; it calls eZSectionFunctionCollection::fetchObjectList() (kernel/section/ezsectionfunctioncollection.php).
Parameters
| Parameter | Type | Required | Default |
|---|---|---|---|
section_id | integer | yes | |
offset | integer | no | false |
limit | integer | no | false |
sort_order | variant | no | false |
status | string | no | false |
Example
In a template (the values are placeholders of each parameter's type):
def $result = fetch( 'section', 'object_list', hash( 'section_id', 1 ) )
{* with every parameter *}
{def $all = fetch( 'section', 'object_list', hash( 'section_id', 1,
'offset', 1,
'limit', 1,
'sort_order', $sort_order,
'status', 'status' ) )}In PHP, the same function through the function handler (lib/ezutils/classes/ezfunctionhandler.php):
$result = eZFunctionHandler::execute( 'section', 'object_list', array( 'section_id' => 1 ) );In a shipped template
The first use in the templates of this installation, design/admin/templates/section/view.tpl line 179:
foreach fetch( 'section', 'object_list', hash( 'section_id', $section.id, 'limit', $number_of_items, 'offset', $view_parameters.offset ) ) as $objectRelated
Generated by ./console exp:help:examples from kernel/section/function_definition.php, kernel/section/ezsectionfunctioncollection.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.