fetch( 'content', 'object' )
Defined in kernel/content/function_definition.php; it calls eZContentFunctionCollection::fetchContentObject() (kernel/content/ezcontentfunctioncollection.php).
Operation type: read.
Parameters
| Parameter | Type | Required | Default |
|---|---|---|---|
object_id | integer | no | false |
remote_id | string | no | false |
Example
In a template (the values are placeholders of each parameter's type):
def $result = fetch( 'content', 'object', hash( 'object_id', 1 ) )
{* with every parameter *}
{def $all = fetch( 'content', 'object', hash( 'object_id', 1,
'remote_id', 'remote_id' ) )}In PHP, the same function through the function handler (lib/ezutils/classes/ezfunctionhandler.php):
$result = eZFunctionHandler::execute( 'content', 'object', array( 'object_id' => 1 ) );In a shipped template
The first use in the templates of this installation, design/admin/templates/content/trash.tpl line 208:
<dd>if $item.owner_name<a href=concat( '/content/view/full/', fetch( 'content', 'object', hash( 'object_id', $item.owner_id ) ).main_node_id )|ezurl dir="auto">$item.owner_name|wash</a>else'Unknown'|i18n( 'design/admin/content/trash' )/if</dd>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.