Skip to the content
Documentation

class_attribute_list

No ratings yet

Summary

Fetches the attributes of a class.

Usage

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

Parameters

Name Type Description Required
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.

Contributors

Comments

Add a comment

Comments are read by a moderator before they appear.