eZPublish  4.4
eZContentClassAttribute Class Reference

Encapsulates data for a class attribute. More...

+ Inheritance diagram for eZContentClassAttribute:
+ Collaboration diagram for eZContentClassAttribute:

Public Member Functions

 __clone ()
 
 content ()
 
 currentModule ()
 
 customHTTPAction ($module, $http, $action)
 
 dataTextI18n ($languageLocale=false)
 Returns data_text_i18n of attribute based on serialized_data_text. More...
 
 dataTextI18nList ()
 Returns data_text_i18n list for all locales for attribute. More...
 
 dataType ()
 
 description ($languageLocale=false)
 Returns description of attribute based on serialized_description_list. More...
 
 descriptionList ()
 Returns description list for all locales for attribute. More...
 
 diff ($old, $new)
 
 displayInfo ()
 
 editLocale ()
 Returns locale code as set with self::setEditLocale(). More...
 
 eZContentClassAttribute ($row)
 
 initializeObjectAttributes (&$objects=null)
 
 instantiate ($contentobjectID, $languageCode=false, $version=1)
 
 instantiateTemporary ($contentobjectID=false)
 
 move ($down, $params=null)
 
 name ($languageLocale=false)
 Returns name of attribute based on serialized_name_list. More...
 
 nameList ()
 Returns name list for all locales for attribute. More...
 
 removeThis ($quiet=false)
 
 removeTranslation ($languageLocale)
 Removes an translation (as in the serilized strings for name, description or data_text_i18n) More...
 
 setAlwaysAvailableLanguage ($languageLocale)
 Specify AlwaysAvailableLanguage (for name, description or data_text_i18n) More...
 
 setContent ($content)
 
 setDataTextI18n ($string, $languageLocale=false)
 Sets data_text_i18n of attribute, store() will take care of writing back to serialized_data_text. More...
 
 setDescription ($description, $languageLocale=false)
 Sets description of attribute, store() will take care of writing back to serialized_description_list. More...
 
 setEditLocale ($languageLocale=false)
 Sets locale code of attribute for use by datatypes in class/edit storing process. More...
 
 setName ($name, $languageLocale=false)
 Sets name of attribute, store() will take care of writing back to serialized_name_list. More...
 
 store ($fieldFilters=null)
 
 storeDefined ()
 Store the content class in the version status "defined". More...
 
 storeVersioned ($version)
 Store the content class in the specified version status. More...
 
- Public Member Functions inherited from eZPersistentObject
 attribute ($attr, $noFunction=false)
 
 attributes ()
 
 eZPersistentObject ($row)
 
 fill ($row)
 
 hasAttribute ($attr)
 
 hasDirtyData ()
 
 remove ($conditions=null, $extraConditions=null)
 
 setAttribute ($attr, $val)
 
 setHasDirtyData ($hasDirtyData)
 
 store ($fieldFilters=null)
 
 sync ($fieldFilters=null)
 

Static Public Member Functions

static cachedInfo ()
 
static classAttributeIDByIdentifier ($identifier)
 Resolves the string class attribute identifier $identifier to its numeric value Use eZContentObjectTreeNode::classAttributeIDByIdentifier() for < 4.1. More...
 
static classAttributeIdentifierByID ($id)
 Resolves the numeric class attribute identifier $id to its string value. More...
 
static create ($class_id, $data_type_string, $optionalValues=array(), $languageLocale=false)
 
static dataTypeByID ($classAttributeID)
 
static definition ()
 
static expireCache ($contentClassAttributeID=false, $contentClassID=false)
 Clears all content class attribute related caches. More...
 
static fetch ($id, $asObject=true, $version=eZContentClass::VERSION_STATUS_DEFINED, $field_filters=null)
 
static fetchFilteredList ($cond, $asObject=true)
 
static fetchList ($asObject=true, $parameters=array())
 
static fetchListByClassID ($classID, $version=eZContentClass::VERSION_STATUS_DEFINED, $asObject=true)
 
static nameFromSerializedString ($serializedNameList, $languageLocale=false)
 Returns name from serialized string, can be used for serialized description and data_text as well. More...
 
static sortKeyTypeByID ($classAttributeID)
 
- Static Public Member Functions inherited from eZPersistentObject
static conditionText ($conditions)
 
static conditionTextByRow ($conditions, $row)
 
static count ($def, $conds=null, $field=null)
 
static definition ()
 
static escapeArray ($array)
 
static fetchObject ($def, $field_filters, $conds, $asObject=true, $grouping=null, $custom_fields=null)
 
static fetchObjectList ($def, $field_filters=null, $conds=null, $sorts=null, $limit=null, $asObject=true, $grouping=false, $custom_fields=null, $custom_tables=null, $custom_conds=null)
 
static getShortAttributeName ($db, $def, $attrName)
 
static handleRows ($rows, $class_name, $asObject)
 
static newObjectOrder ($def, $orderField, $conditions)
 
static removeObject ($def, $conditions=null, $extraConditions=null)
 
static reorderObject ($def, $orderField, $conditions, $down=true)
 
static swapRow ($table, $keys, $order_id, $rows, $id1, $id2)
 
static updateObjectList ($parameters)
 

Public Attributes

 $Content
 Contains the content for this attribute. More...
 
 $ContentClassID
 
 $DataTypeString
 
 $DescriptionList
 
 $DisplayInfo
 Contains information on how to display the current attribute in various viewmodes. More...
 
 $ID
 
 $Identifier
 
 $IsInformationCollector
 
 $IsRequired
 
 $IsSearchable
 
 $Module
 
 $NameList
 
 $Position
 
 $SerializedNameList
 
 $Version
 
- Public Attributes inherited from eZPersistentObject
 $PersistentDataDirty
 Whether the data is dirty, ie needs to be stored, or not. More...
 

Static Protected Member Functions

static classAttributeIdentifiersHash ()
 Returns the class attribute identifier hash for the current database. More...
 

Protected Attributes

 $EditLocale = false
 

Static Private Attributes

static $identifierHash = null
 In-memory cache for class attributes identifiers / id matching. More...
 

Detailed Description

Encapsulates data for a class attribute.

Member Function Documentation

eZContentClassAttribute::__clone ( )
static eZContentClassAttribute::cachedInfo ( )
static

Referenced by dataTypeByID(), and sortKeyTypeByID().

static eZContentClassAttribute::classAttributeIDByIdentifier (   $identifier)
static

Resolves the string class attribute identifier $identifier to its numeric value Use eZContentObjectTreeNode::classAttributeIDByIdentifier() for < 4.1.

If multiple classes have the same identifier, the first found is returned.

Since
Version 4.1
Returns
int|false Returns classattributeid or false

Referenced by eZContentObjectTreeNode\classAttributeIDByIdentifier().

static eZContentClassAttribute::classAttributeIdentifierByID (   $id)
static

Resolves the numeric class attribute identifier $id to its string value.

Since
Version 4.1
Returns
string|false Returns classattributeidentifier or false

Referenced by eZContentObjectAttribute\contentClassAttributeIdentifier().

static eZContentClassAttribute::classAttributeIdentifiersHash ( )
staticprotected

Returns the class attribute identifier hash for the current database.

If it is outdated or non-existent, the method updates/generates the file

Since
Version 4.1 protected
Returns
array Returns hash of classattributeidentifier => classattributeid
eZContentClassAttribute::content ( )
Returns
The content for this attribute.
static eZContentClassAttribute::create (   $class_id,
  $data_type_string,
  $optionalValues = array(),
  $languageLocale = false 
)
static

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.

Referenced by eZSiteInstaller\addClassAttributes(), and eZContentClassPackageHandler\install().

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

Executes the custom HTTP action

eZContentClassAttribute::dataTextI18n (   $languageLocale = false)

Returns data_text_i18n of attribute based on serialized_data_text.

Parameters
string | false$languageLocaleUses AlwaysAvailable language if false
Returns
string
eZContentClassAttribute::dataTextI18nList ( )

Returns data_text_i18n list for all locales for attribute.

Returns
array
eZContentClassAttribute::dataType ( )
static eZContentClassAttribute::dataTypeByID (   $classAttributeID)
static
eZContentClassAttribute::description (   $languageLocale = false)

Returns description of attribute based on serialized_description_list.

Parameters
string | false$languageLocaleUses AlwaysAvailable language if false
Returns
string
eZContentClassAttribute::descriptionList ( )

Returns description list for all locales for attribute.

Returns
array
eZContentClassAttribute::diff (   $old,
  $new 
)

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

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

Returns locale code as set with self::setEditLocale().

Returns
string|false
static eZContentClassAttribute::expireCache (   $contentClassAttributeID = false,
  $contentClassID = false 
)
static

Clears all content class attribute related caches.

Parameters
int$contentClassAttributeIDSpecific attribute ID to clear cache for
int$contentClassIDSpecific attribute ID to clear cache for
Returns
void
Since
4.2

Referenced by eZContentClass\expireCache().

eZContentClassAttribute::eZContentClassAttribute (   $row)

Referenced by create().

static eZContentClassAttribute::fetchList (   $asObject = true,
  $parameters = array() 
)
static
static eZContentClassAttribute::fetchListByClassID (   $classID,
  $version = eZContentClass::VERSION_STATUS_DEFINED,
  $asObject = true 
)
static
eZContentClassAttribute::initializeObjectAttributes ( $objects = null)
eZContentClassAttribute::instantiate (   $contentobjectID,
  $languageCode = false,
  $version = 1 
)
eZContentClassAttribute::instantiateTemporary (   $contentobjectID = false)
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.
eZContentClassAttribute::name (   $languageLocale = false)

Returns name of attribute based on serialized_name_list.

Parameters
string | false$languageLocaleUses AlwaysAvailable language if false
Returns
string
static eZContentClassAttribute::nameFromSerializedString (   $serializedNameList,
  $languageLocale = false 
)
static

Returns name from serialized string, can be used for serialized description and data_text as well.

Parameters
string$serializedNameList
string | false$languageLocaleUses AlwaysAvailable language if false
Returns
string

Referenced by eZContentObjectVersion\fetchAttributes().

eZContentClassAttribute::nameList ( )

Returns name list for all locales for attribute.

Returns
array
eZContentClassAttribute::removeThis (   $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.
eZContentClassAttribute::removeTranslation (   $languageLocale)

Removes an translation (as in the serilized strings for name, description or data_text_i18n)

Parameters
string$languageLocale
eZContentClassAttribute::setAlwaysAvailableLanguage (   $languageLocale)

Specify AlwaysAvailableLanguage (for name, description or data_text_i18n)

Parameters
string | false$languageLocale
eZContentClassAttribute::setContent (   $content)

Sets the content for the current attribute

eZContentClassAttribute::setDataTextI18n (   $string,
  $languageLocale = false 
)

Sets data_text_i18n of attribute, store() will take care of writing back to serialized_data_text.

Parameters
string$string
string | false$languageLocaleUses AlwaysAvailable language if false
Returns
string Return old value
eZContentClassAttribute::setDescription (   $description,
  $languageLocale = false 
)

Sets description of attribute, store() will take care of writing back to serialized_description_list.

Parameters
string$description
string | false$languageLocaleUses AlwaysAvailable language if false
Returns
string Return old value
eZContentClassAttribute::setEditLocale (   $languageLocale = false)

Sets locale code of attribute for use by datatypes in class/edit storing process.

Parameters
string | false$languageLocaleUses AlwaysAvailable language if false
eZContentClassAttribute::setName (   $name,
  $languageLocale = false 
)

Sets name of attribute, store() will take care of writing back to serialized_name_list.

Parameters
string$name
string | false$languageLocaleUses AlwaysAvailable language if false
Returns
string Return old value
static eZContentClassAttribute::sortKeyTypeByID (   $classAttributeID)
static
eZContentClassAttribute::store (   $fieldFilters = null)
eZContentClassAttribute::storeDefined ( )

Store the content class in the version status "defined".

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.
Returns
null|false false if the operation failed
eZContentClassAttribute::storeVersioned (   $version)

Store the content class in the specified version status.

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.
Parameters
int$versionversion status
Since
Version 4.3
Returns
null|false false if the operation failed

Referenced by storeDefined().

Member Data Documentation

eZContentClassAttribute::$Content

Contains the content for this attribute.

Referenced by content().

eZContentClassAttribute::$ContentClassID

Referenced by initializeObjectAttributes(), and move().

eZContentClassAttribute::$DataTypeString
eZContentClassAttribute::$DescriptionList
eZContentClassAttribute::$DisplayInfo

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

Referenced by displayInfo().

eZContentClassAttribute::$EditLocale = false
protected

Referenced by editLocale().

eZContentClassAttribute::$ID
eZContentClassAttribute::$Identifier
eZContentClassAttribute::$identifierHash = null
staticprivate

In-memory cache for class attributes identifiers / id matching.

Referenced by classAttributeIDByIdentifier(), and classAttributeIdentifierByID().

eZContentClassAttribute::$IsInformationCollector
eZContentClassAttribute::$IsRequired
eZContentClassAttribute::$IsSearchable
eZContentClassAttribute::$Module

Referenced by currentModule().

eZContentClassAttribute::$NameList
eZContentClassAttribute::$Position

Referenced by move().

eZContentClassAttribute::$SerializedNameList
eZContentClassAttribute::$Version

Referenced by move().


The documentation for this class was generated from the following file: