class_attribute

Summary

Fetches an attribute of a content class.

Usage

fetch( 'content', 'class_attribute', hash( 'attribute_id', attribute_id,
                                         [ 'version_id',   version_id ] ) )

Parameters

NameTypeDescriptionRequired
attribute_id integer The ID number of the class attribute that should be fetched. Yes.
version_id integer The status/version of the class. No.

Returns

The specified class attribute as an ezcontentclassattribute object or FALSE.

Description

This function fetches the class attribute specified by the "attribute_id" parameter and returns it as an ezcontentclassattribute object. The function will return FALSE if the specified class attribute is unavailable. The optional "version_id" parameter can be used to fetch the specified class attribute from a certain version of a class. The following versions / status codes can be used:

Examples

Example 1

{def $class_attribute=fetch( 'content', 'class_attribute', hash( 'attribute_id', 231 ) )}
{$class_attribute.name|wash}

Outputs the name of class attribute number 231.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2013 eZ Systems AS (except where otherwise noted). All rights reserved.