ibexa

Path

ez publish / technical manual / 3.10 / reference / modules / content / fetch functions / class_attribute_list


Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.

class_attribute_list

Summary

Fetches the attributes of a class.

Usage

fetch( 'content', 'class_attribute_list',
       hash( 'class_id', class_id,
           [ 'version_id', version_id ] ) )

Parameters

NameTypeDescriptionRequired
class_id integer The ID number of the target class. Yes.
version_id integer The version/status of the class. No.

Returns

Array of ezcontentclassattribute objects or FALSE.

Description

This function fetches the attributes of a class. The ID number of the target class must be specified using the "class_id" parameter. The function returns an array of ezcontentclassattribute objects or FALSE if the specified class attribute is unavailable. The optional "version_id" parameter can be used to fetch class attributes from a certain version of a class. The following versions / status codes can be used:

  • 0: defined
  • 1: temporary
  • 2: modified

Examples

Example 1

{def $attributes=fetch( 'content', 'class_attribute_list', hash( 'class_id', 13 ) )}
 
{foreach $attributes as $attribute}
    {$attribute.name|wash} <br />
{/foreach}

Outputs the names of the attributes that belong to class number 13.

Balazs Halasy (06/02/2004 12:03 pm)

Balazs Halasy (29/04/2005 8:23 am)


Comments

There are no comments.