Caution: This documentation is for eZ Publish legacy, from version 3.x to 6.x.
For 5.x documentation covering Platform see eZ Documentation Center, for difference between legacy and Platform see 5.x Architecture overview.

calendar

Summary

This function fetches the date time list when objects were published.

Usage

fetch( 'content', 'calendar',
 hash( 'parent_node_id',              parent_node_id,   
       [ 'offset',                                offset,                    ]
       [ 'limit',                                   limit,                     ]
       [ 'depth',                                depth,                     ]
       [ 'depth_operator',                 depth_operator,            ]
       [ 'class_id',                            class_id,                  ]
       [ 'attribute_filter',                   attribute_filter,          ]
       [ 'extended_attribute_filter',  extended_attribute_filter, ]
       [ 'class_filter_type',               class_filter_type,         ]
       [ 'class_filter_array',              class_filter_array,        ]
       [ 'group_by',                          group_by,                  ]
       [ 'main_node_only',              main_node_only,            ]
       [ 'ignore_visibility',                ignore_visibility,         ]
       [ 'limitation',                          limitation                 ] ) )

Parameters

NameTypeDescriptionRequired
parent_node_id integer The ID number of the parent node. Yes.
offset integer The offset to start at. No.
limit integer The number of date time that should be fetched. No.
depth integer The maximum level of depth that should be explored (1 by default). No.
depth_operator string The logic to use when checking the depth.('le' by default). No.
class_id integer The class id of the objects to be fetched. No.
attribute_filter mixed The attribute level filter logic. No.
extended_attribute_filter mixed The extended attribute level filter logic. No.
class_filter_type string The type of class filtering (include/exclude). No.
class_filter_array array The classes that should be filtered. No.
group_by array Deprecated No.
main_node_only boolean Type of nodes that should be fetched (all or main nodes only). No.
ignore_visibility boolean Makes it possible to fetch hidden nodes. (false by default) No.
limitation array The limitations that one user has on the objects to be fetched No.

Returns

An array of publish date time of objects or FALSE.

Description

This function fetches the publish date time of objects. The parent node must be specified using "parent_node_id" parameter.

The depth parameter: The depth parameter can be used to specify the level of depth (within the branch) that the function should explore when it is running. If the depth is set to one, this function will simply act as the list function. If the depth is greater than one, the function will fetch nodes further down in the branch. The default value is unlimited.

The depth operator: The depth operator can be set to either "lt", "le", "eq", "gt" or "ge" - meaning "less than", "less equal", "equal to", "greater than" and "greater equal". For example, if it is set to 'eq', only nodes with the depth that was specified using the depth parameter will be fetched.

Examples

Example 1

{def $nodes=fetch( 'content', 'calendar',
 hash( 'parent_node_id', 42 ) )}
    {foreach $nodes as $node}
     {$node.published|wash} <br />
 {/foreach}

The example outputs publish date time of all objects under node 42 in depth 1.

Example 2

{def $nodes=fetch( 'content', 'calendar',
 hash( 'parent_node_id', 42,
        'depth', 1,
        'depth_opeator', 'ge' ) )}
   {foreach $nodes as $node}
     {$node.published|wash} <br />
   {/foreach}

The example outputs publish date time of all object under node id 42.

Balazs Halasy (04/04/2005 2:44 pm)

Geir Arne Waaler (07/12/2010 2:34 pm)

Balazs Halasy, Geir Arne Waaler


Comments

There are no comments.