eZContentClassAttribute Class Reference
[Kernel system]

Encapsulates data for a class attribute. More...

Inheritance diagram for eZContentClassAttribute:
eZPersistentObject

List of all members.

Public Member Functions

 cachedInfo ()
 clone ()
content ()
 create ($class_id, $data_type_string, $optionalValues=array(), $languageLocale=false)
currentModule ()
 customHTTPAction (&$module, &$http, $action)
dataType ()
 definition ()
 diff ($old, $new)
displayInfo ()
 eZContentClassAttribute ($row)
fetch ($id, $asObject=true, $version=EZ_CLASS_VERSION_STATUS_DEFINED, $field_filters=null)
fetchFilteredList ($cond, $asObject=true)
fetchList ($asObject=true, $parameters=array())
fetchListByClassID ($classID, $version=EZ_CLASS_VERSION_STATUS_DEFINED, $asObject=true)
 instantiate ($contentobjectID, $languageCode=false, $version=1)
instantiateTemporary ($contentobjectID=false)
 move ($down, $params=null)
name ($languageLocale=false)
nameList ()
 remove ($quiet=false)
 removeTranslation ($languageLocale)
 setAlwaysAvailableLanguage ($languageLocale)
 setContent ($content)
 setName ($name, $languageLocale=false)
 store ()
 storeDefined ()

Static Public Member Functions

 dataTypeByID ($classAttributeID)
 nameFromSerializedString ($serailizedNameList, $languageLocale=false)
 sortKeyTypeByID ($classAttributeID)

Private Attributes

 $Content
 $ContentClassID
 $DataTypeString
 $DisplayInfo
 Contains information on how to display the current attribute in various viewmodes.
 $ID
 $Identifier
 $IsInformationCollector
 $IsRequired
 $IsSearchable
 $Module
 $NameList
 $Position
 $SerializedNameList
 $Version

Detailed Description

Encapsulates data for a class attribute.

Definition at line 42 of file ezcontentclassattribute.php.


Member Function Documentation

eZContentClassAttribute::cachedInfo (  ) 

Definition at line 581 of file ezcontentclassattribute.php.

Referenced by dataTypeByID(), and sortKeyTypeByID().

eZContentClassAttribute::clone (  ) 

Definition at line 174 of file ezcontentclassattribute.php.

& eZContentClassAttribute::content (  ) 
Returns:
The content for this attribute.
Note:
The reference for the return value is required to workaround a bug with PHP references.

Definition at line 524 of file ezcontentclassattribute.php.

eZContentClassAttribute::create ( class_id,
data_type_string,
optionalValues = array(),
languageLocale = false 
)

Creates an 'eZContentClassAttribute' object.

To specify contentclassattribute name use either $optionalValues['serialized_name_list'] or combination of $optionalValues['name'] and/or $languageLocale.

In case of conflict(when both 'serialized_name_list' and 'name' with/without $languageLocale are specified) 'serialized_name_list' has top priority. This means that 'name' and $languageLocale will be ingnored because 'serialized_name_list' already has all needed info about names and languages.

If 'name' is specified then the contentclassattribute will have a name in $languageLocale(if specified) or in default language.

If neither of 'serialized_name_list' or 'name' isn't specified then the contentclassattribute will have an empty name in 'languageLocale'(if specified) or in default language.

Returns:
'eZContentClassAttribute' object.

Definition at line 223 of file ezcontentclassattribute.php.

Referenced by cachedInfo(), dataType(), eZContentClassPackageHandler::install(), instantiate(), and instantiateTemporary().

& eZContentClassAttribute::currentModule (  ) 
Returns:
the module which uses this attribute or null if no module set.
Note:
Currently only customHTTPAction sets this.

Definition at line 576 of file ezcontentclassattribute.php.

eZContentClassAttribute::customHTTPAction ( &$  module,
&$  http,
action 
)

Executes the custom HTTP action

Definition at line 563 of file ezcontentclassattribute.php.

& eZContentClassAttribute::dataType (  ) 
eZContentClassAttribute::dataTypeByID ( classAttributeID  )  [static]
eZContentClassAttribute::definition (  ) 
Returns:
the definition for the object, the default implementation is to return an empty array. It's upto each inheriting class to return a proper definition array.

The definition array is an associative array consists of these keys:

  • fields - an associative array of fields which defines which database field (the key) is to fetched and how they map to object member variables (the value).
  • keys - an array of fields which is used for uniquely identifying the object in the table.
  • function_attributes - an associative array of attributes which maps to member functions, used for fetching data with functions.
  • set_functions - an associative array of attributes which maps to member functions, used for setting data with functions.
  • increment_key - the field which is incremented on table inserts.
  • class_name - the classname which is used for instantiating new objecs when fetching from the database.
  • sort - an associative array which defines the default sorting of lists, the key is the table field while the value is the sorting method which is either asc or desc.
  • name - the name of the database table

Example:

function definition()
{
    return array( "fields" => array( "id" => "ID",
                                     "version" => "Version",
                                     "name" => "Name" ),
                  "keys" => array( "id", "version" ),
                  "function_attributes" => array( "current" => "currentVersion",
                                                  "class_name" => "className" ),
                  "increment_key" => "id",
                  "class_name" => "eZContentClass",
                  "sort" => array( "id" => "asc" ),
                  "name" => "ezcontentclass" );
}

Reimplemented from eZPersistentObject.

Definition at line 59 of file ezcontentclassattribute.php.

Referenced by create(), fetch(), fetchFilteredList(), fetchList(), fetchListByClassID(), move(), eZContentClass::removeAttributes(), and eZContentClass::removeTemporary().

eZContentClassAttribute::diff ( old,
new 
)

This methods relay calls to the diff method inside the datatype.

Definition at line 677 of file ezcontentclassattribute.php.

& eZContentClassAttribute::displayInfo (  ) 
Returns:
Information on how to display the class attribute. See eZDataType::classDisplayInformation() for more information on what is returned.

Definition at line 547 of file ezcontentclassattribute.php.

eZContentClassAttribute::eZContentClassAttribute ( row  ) 

Definition at line 44 of file ezcontentclassattribute.php.

Referenced by clone(), and create().

& eZContentClassAttribute::fetch ( id,
asObject = true,
version = EZ_CLASS_VERSION_STATUS_DEFINED,
field_filters = null 
)
& eZContentClassAttribute::fetchFilteredList ( cond,
asObject = true 
)
& eZContentClassAttribute::fetchList ( asObject = true,
parameters = array() 
)

Definition at line 389 of file ezcontentclassattribute.php.

& eZContentClassAttribute::fetchListByClassID ( classID,
version = EZ_CLASS_VERSION_STATUS_DEFINED,
asObject = true 
)
eZContentClassAttribute::instantiate ( contentobjectID,
languageCode = false,
version = 1 
)

Definition at line 254 of file ezcontentclassattribute.php.

& eZContentClassAttribute::instantiateTemporary ( contentobjectID = false  ) 
Note:
The reference for the return value is required to workaround a bug with PHP references.

Definition at line 266 of file ezcontentclassattribute.php.

eZContentClassAttribute::move ( down,
params = null 
)

Moves the object down if $down is true, otherwise up. If object is at either top or bottom it is wrapped around.

Note:
Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Definition at line 491 of file ezcontentclassattribute.php.

& eZContentClassAttribute::name ( languageLocale = false  ) 

Definition at line 692 of file ezcontentclassattribute.php.

eZContentClassAttribute::nameFromSerializedString ( serailizedNameList,
languageLocale = false 
) [static]
& eZContentClassAttribute::nameList (  ) 

Definition at line 703 of file ezcontentclassattribute.php.

eZContentClassAttribute::remove ( quiet = false  ) 
Note:
Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Definition at line 339 of file ezcontentclassattribute.php.

eZContentClassAttribute::removeTranslation ( languageLocale  ) 

Definition at line 721 of file ezcontentclassattribute.php.

eZContentClassAttribute::setAlwaysAvailableLanguage ( languageLocale  ) 

Definition at line 709 of file ezcontentclassattribute.php.

eZContentClassAttribute::setContent ( content  ) 

Sets the content for the current attribute

Definition at line 538 of file ezcontentclassattribute.php.

eZContentClassAttribute::setName ( name,
languageLocale = false 
)

Definition at line 698 of file ezcontentclassattribute.php.

eZContentClassAttribute::sortKeyTypeByID ( classAttributeID  )  [static]
eZContentClassAttribute::store (  ) 

Definition at line 272 of file ezcontentclassattribute.php.

Referenced by storeDefined().

eZContentClassAttribute::storeDefined (  ) 
Note:
Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Definition at line 304 of file ezcontentclassattribute.php.


Member Data Documentation

eZContentClassAttribute::$Content [private]

Contains the content for this attribute

Definition at line 729 of file ezcontentclassattribute.php.

eZContentClassAttribute::$ContentClassID [private]

Definition at line 734 of file ezcontentclassattribute.php.

eZContentClassAttribute::$DataTypeString [private]

Definition at line 740 of file ezcontentclassattribute.php.

eZContentClassAttribute::$DisplayInfo [private]

Contains information on how to display the current attribute in various viewmodes.

Definition at line 731 of file ezcontentclassattribute.php.

eZContentClassAttribute::$ID [private]

Definition at line 732 of file ezcontentclassattribute.php.

eZContentClassAttribute::$Identifier [private]

Definition at line 735 of file ezcontentclassattribute.php.

eZContentClassAttribute::$IsInformationCollector [private]

Definition at line 744 of file ezcontentclassattribute.php.

eZContentClassAttribute::$IsRequired [private]

Definition at line 743 of file ezcontentclassattribute.php.

eZContentClassAttribute::$IsSearchable [private]

Definition at line 742 of file ezcontentclassattribute.php.

eZContentClassAttribute::$Module [private]

Definition at line 745 of file ezcontentclassattribute.php.

eZContentClassAttribute::$NameList [private]

Definition at line 739 of file ezcontentclassattribute.php.

eZContentClassAttribute::$Position [private]

Definition at line 741 of file ezcontentclassattribute.php.

eZContentClassAttribute::$SerializedNameList [private]

Definition at line 737 of file ezcontentclassattribute.php.

eZContentClassAttribute::$Version [private]

Definition at line 733 of file ezcontentclassattribute.php.


The documentation for this class was generated from the following file:
Generated on Mon Jul 12 07:10:15 2010 for eZ publish by  doxygen 1.6.3