fetch( 'content', 'search' )
Defined in kernel/content/function_definition.php; it calls eZContentFunctionCollection::fetchContentSearch() (kernel/content/ezcontentfunctioncollection.php).
Operation type: read.
Parameters
| Parameter | Type | Required | Default |
|---|---|---|---|
text | string | yes | |
subtree_array | array | no | false |
offset | integer | no | false |
limit | integer | no | false |
publish_timestamp | mixed | no | false |
publish_date | integer | no | false |
section_id | integer | no | false |
class_id | integer | no | false |
class_attribute_id | integer | no | false |
ignore_visibility | bool | no | null |
limitation | array | no | null |
sort_by | mixed | no | false |
Example
In a template (the values are placeholders of each parameter's type):
def $result = fetch( 'content', 'search', hash( 'text', 'text' ) )
{* with every parameter *}
{def $all = fetch( 'content', 'search', hash( 'text', 'text',
'subtree_array', array(),
'offset', 1,
'limit', 1,
'publish_timestamp', $publish_timestamp,
'publish_date', 1,
'section_id', 1,
'class_id', 1,
'class_attribute_id', 1,
'ignore_visibility', true(),
'limitation', array(),
'sort_by', $sort_by ) )}In PHP, the same function through the function handler (lib/ezutils/classes/ezfunctionhandler.php):
$result = eZFunctionHandler::execute( 'content', 'search', array( 'text' => 'text' ) );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.