Path

ez.no / ezpublish / documentation / customization / ez publish api documentation / module function definition: content


Module Function Definition: Content

These documentation pages are no longer maintained. Please visit the new documentation site.

This information was extracted from the file /kernal/content/function_definition.php
from ezPublish 3.2-3, and is subject to change.

The functions documented here can be used with the fetch
function in the following manner:

fetch(content,[method],[parameters])

for examples of using the fetch function please see fetch function examples.

Method: object

Parameters:
[object_id]
description - id of the object you are trying to fetch.
type - integer
required - true
Returns:
The object associated with this [object_id].
Usage:

fetch(

  content,

  object, 

  hash(

     object_id, [object_id]

  )

)

Method: version

Parameters:
[object_id]
description - id of the object you are trying to fetch.
type - integer
required - true
[version_id]
description - version id of the object you are trying to fetch.
type - integer
default - false
required - true
Returns:
The version of the object associated with this [object_id].
Usage:

fetch(

  content,

  version, 

  hash(

     object_id, [object_id],

     version_id, [version_id]

  )

)

Method: node

Parameters:
[node_id]
description - id of the node you are trying to fetch.
type - integer
required - true
Returns:
The node associated with this [node_id].
Usage:

fetch(

  content,

  node, 

  hash(

     node_id, [node_id]

  )

)

Method: locale_list

Parameters:
none
Returns:
An array containing a list of the ezLocale objects that are installed on this site.
Usage:

fetch(

  content,

  locale_list 

)

Method: translation_list

Parameters:
none
Returns:
An array containing a list of ezLocale objects that the current site has translations for.
Usage:

fetch(

  content,

  translation_list 

)

Method: class

Parameters:
[class_id]
description - id of the class you are trying to fetch.
type - integer
required - true
Returns:
The class associated with this [class_id].
Usage:

fetch(

  content,

  class, 

  hash(

     class_id, [class_id]

  )

)

Method: class_attribute_list

Parameters:
[class_id]
description - id of the class you are trying to fetch a class attribute list for.
type - integer
required - true
[version_id]
description - version id of the class you are trying to fetch a class attribute list for.
type - integer
required - false
default - 0
Returns:
An array containing a list of the ezContentClassAttribute objects for the given class.
Usage:

fetch(

  content,

  class_attribute_list, 

  hash(

     class_id, [class_id],

     version_id, [version_id]

  )

)

Method: class_attribute

Parameters:
[attribute_id]
description - id of the class attribute you are trying to fetch.
type - integer
required - true
[version_id]
description - version id of the attribute you are trying to fetch.
type - integer
required - false
default - 0
Returns:
An ezContentClassAttribute corresponding to the [attribute_id].
Usage:

fetch(

  content,

  class_attribute, 

  hash(

     class_id, [class_id],

     version_id, [version_id]

  )

)

Notes:
This method doesn't seem to do anything.

Method: list

Parameters:
[parent_node_id]
description - parent node id of the node subtree you are trying to fetch.
type - integer
required - true
[sort_by]
description - An array of sort terms to sort the subtree by.
type - array
required - false
default - array()
[offset]
description - The subnode to start at. An offset of 3, skips the first 3 subnodes and starts the array at subnode 4.
type - integer
required - false
default - false
[limit]
description - The number of subnodes to return.
type - integer
required - false
default - false
[depth]
description - The depth of subnodes to recurse in the subnode tree.
type - integer
required - false
default - 1
[depth_operator]
description - An operator that used to work out which noes to display.
type - string
required - false
default - 'le'
[class_id]
description - Limit the subnodes returned to a certain class.
type - integer
required - false
default - false
[attribute_filter]
description - Allows you to filter the subnodes returned on attribute values,
generally an array in the form: array( [class_attribute_id], '[filter_type]', [filter_value] ),
where [filter_type] can be either =,!=,,=
type - mixed
required - false
default - false
[extended_attribute_filter]
description - ?
type - mixed
required - false
default - false
[class_filter_array]
description - An array containing the id of the classes that you want to filter the results by.
type - array
required - false
default - false
[class_filter_type]
description - The type of filter to apply using the [class_filter_array]. Either include or exclude
type - string
required - false
default - false
Returns:
An array of ezContentObjectTreeNode objects corresponding to the subtree of the [parent_node_id].
Usage:

fetch(

  content,

  list, 

  hash(

     parent_node_id, [parent_node_id],

     sort_by, [sort_by_array],

     offset, [offset],

     limit, [limit],

     depth, [depth],

     depth_operator, [depth_operator],

     class_id, [class_id],

     attribute_filter, [attribute_filter_array],

     extended_attribute_filter, [attribute_filter_array],

     class_filter_array, [class_filter_array],

     class_filter_type, [class_filter_type]

  )

)

Comments

Contents

Customization

Access control
eZ publish API Documentation
    Module Function Definition: Content
Content structure
Custom design
Components
Tips & Tricks
Troubleshooting


Created

28/11/2003
5:08:51 pm
by Tim Ross

Last updated

05/02/2004
1:31:01 pm
by Tim Ross

Authors

Tim Ross



This page is part of the eZ Publish documentation. The documentation is available under the GNU Free Documentation License. All contributions will be released under the terms of this license.