|
eZ Publish
[trunk]
|
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. | |
| dataTextI18nList () | |
| Returns data_text_i18n list for all locales for attribute. | |
| dataType () | |
| description ($languageLocale=false) | |
| Returns description of attribute based on serialized_description_list. | |
| descriptionList () | |
| Returns description list for all locales for attribute. | |
| diff ($old, $new) | |
| displayInfo () | |
| editLocale () | |
| Returns locale code as set with self::setEditLocale(). | |
| eZContentClassAttribute ($row) | |
| initializeObjectAttributes (&$objects=null) | |
| Initialize the attribute in the existing objects. | |
| 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. | |
| nameList () | |
| Returns name list for all locales for attribute. | |
| removeThis ($quiet=false) | |
| removeTranslation ($languageLocale) | |
| Removes an translation (as in the serilized strings for name, description or data_text_i18n) | |
| setAlwaysAvailableLanguage ($languageLocale) | |
| Specify AlwaysAvailableLanguage (for name, description or data_text_i18n) | |
| setContent ($content) | |
| setDataTextI18n ($string, $languageLocale=false) | |
| Sets data_text_i18n of attribute, store() will take care of writing back to serialized_data_text. | |
| setDescription ($description, $languageLocale=false) | |
| Sets description of attribute, store() will take care of writing back to serialized_description_list. | |
| setEditLocale ($languageLocale=false) | |
| Sets locale code of attribute for use by datatypes in class/edit storing process. | |
| setName ($name, $languageLocale=false) | |
| Sets name of attribute, store() will take care of writing back to serialized_name_list. | |
| store ($fieldFilters=null) | |
| Stores the object in the database, uses storeObject() to do the actual job and passes $fieldFilters to it. | |
| storeDefined () | |
| Store the content class in the version status "defined". | |
| storeVersioned ($version) | |
| Store the content class in the specified version status. | |
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. | |
| static | classAttributeIdentifierByID ($id) |
| Resolves the numeric class attribute identifier $id to its string value. | |
| static | create ($class_id, $data_type_string, $optionalValues=array(), $languageLocale=false) |
| static | dataTypeByID ($classAttributeID) |
| static | definition () |
| Returns the definition for the object, the default implementation is to return an empty array. | |
| static | expireCache ($contentClassAttributeID=false, $contentClassID=false) |
| Clears all content class attribute related caches. | |
| 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. | |
| static | sortKeyTypeByID ($classAttributeID) |
Public Attributes | |
| $Content | |
| Contains the content for this attribute. | |
| $ContentClassID | |
| $DataTypeString | |
| $DescriptionList | |
| $DisplayInfo | |
| Contains information on how to display the current attribute in various viewmodes. | |
| $ID | |
| $Identifier | |
| $IsInformationCollector | |
| $IsRequired | |
| $IsSearchable | |
| $Module | |
| $NameList | |
| $Position | |
| $SerializedNameList | |
| $Version | |
Static Protected Member Functions | |
| static | classAttributeIdentifiersHash () |
| Returns the class attribute identifier hash for the current database. | |
Protected Attributes | |
| $EditLocale = false | |
Static Private Attributes | |
| static | $identifierHash = null |
| In-memory cache for class attributes identifiers / id matching. | |
Encapsulates data for a class attribute.
Definition at line 18 of file ezcontentclassattribute.php.
Definition at line 196 of file ezcontentclassattribute.php.
| static eZContentClassAttribute::cachedInfo | ( | ) | [static] |
Definition at line 590 of file ezcontentclassattribute.php.
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.
Definition at line 863 of file ezcontentclassattribute.php.
| static eZContentClassAttribute::classAttributeIdentifierByID | ( | $ | id | ) | [static] |
Resolves the numeric class attribute identifier $id to its string value.
Definition at line 880 of file ezcontentclassattribute.php.
Referenced by eZContentObjectAttribute\contentClassAttributeIdentifier().
| static eZContentClassAttribute::classAttributeIdentifiersHash | ( | ) | [static, protected] |
Returns the class attribute identifier hash for the current database.
If it is outdated or non-existent, the method updates/generates the file
Definition at line 902 of file ezcontentclassattribute.php.
Referenced by classAttributeIDByIdentifier().
Definition at line 533 of file ezcontentclassattribute.php.
| 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.
Definition at line 220 of file ezcontentclassattribute.php.
Referenced by eZSiteInstaller\addClassAttributes(), cachedInfo(), dataType(), initializeObjectAttributes(), eZContentClassPackageHandler\install(), instantiate(), and instantiateTemporary().
null if no module set. Definition at line 585 of file ezcontentclassattribute.php.
| eZContentClassAttribute::customHTTPAction | ( | $ | module, |
| $ | http, | ||
| $ | action | ||
| ) |
Executes the custom HTTP action
Definition at line 572 of file ezcontentclassattribute.php.
| eZContentClassAttribute::dataTextI18n | ( | $ | languageLocale = false | ) |
Returns data_text_i18n of attribute based on serialized_data_text.
| string | false | $languageLocale | Uses AlwaysAvailable language if false |
Definition at line 774 of file ezcontentclassattribute.php.
Returns data_text_i18n list for all locales for attribute.
Definition at line 796 of file ezcontentclassattribute.php.
Definition at line 525 of file ezcontentclassattribute.php.
Referenced by content(), customHTTPAction(), diff(), displayInfo(), eZContentClassAttribute(), removeThis(), store(), and storeVersioned().
| static eZContentClassAttribute::dataTypeByID | ( | $ | classAttributeID | ) | [static] |
Definition at line 669 of file ezcontentclassattribute.php.
Referenced by eZContentObjectTreeNode\dataTypeByClassAttributeID().
| static eZContentClassAttribute::definition | ( | ) | [static] |
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:
Example: public static 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 62 of file ezcontentclassattribute.php.
Referenced by create(), fetch(), fetchFilteredList(), fetchList(), fetchListByClassID(), move(), eZContentClass\removeAttributes(), and eZContentClass\removeTemporary().
| eZContentClassAttribute::description | ( | $ | languageLocale = false | ) |
Returns description of attribute based on serialized_description_list.
| string | false | $languageLocale | Uses AlwaysAvailable language if false |
Definition at line 741 of file ezcontentclassattribute.php.
Returns description list for all locales for attribute.
Definition at line 763 of file ezcontentclassattribute.php.
| eZContentClassAttribute::diff | ( | $ | old, |
| $ | new | ||
| ) |
This methods relay calls to the diff method inside the datatype.
Definition at line 683 of file ezcontentclassattribute.php.
Definition at line 556 of file ezcontentclassattribute.php.
Returns locale code as set with self::setEditLocale().
Definition at line 806 of file ezcontentclassattribute.php.
| static eZContentClassAttribute::expireCache | ( | $ | contentClassAttributeID = false, |
| $ | contentClassID = false |
||
| ) | [static] |
Clears all content class attribute related caches.
| int | $contentClassAttributeID | Specific attribute ID to clear cache for |
| int | $contentClassID | Specific attribute ID to clear cache for |
Definition at line 1083 of file ezcontentclassattribute.php.
Referenced by removeThis(), store(), and storeVersioned().
Definition at line 20 of file ezcontentclassattribute.php.
Referenced by create().
| static eZContentClassAttribute::fetch | ( | $ | id, |
| $ | asObject = true, |
||
| $ | version = eZContentClass::VERSION_STATUS_DEFINED, |
||
| $ | field_filters = null |
||
| ) | [static] |
Definition at line 379 of file ezcontentclassattribute.php.
Referenced by eZISBN10To13Converter\addAllClasses(), eZISBN10To13Converter\addAttribute(), eZWaitUntilDate\addEntry(), eZInformationCollectionAttribute\contentClassAttribute(), eZContentFunctionCollection\fetchClassAttribute(), and eZIdentifierType\fetchClassAttributeHTTPInput().
| static eZContentClassAttribute::fetchFilteredList | ( | $ | cond, |
| $ | asObject = true |
||
| ) | [static] |
Definition at line 480 of file ezcontentclassattribute.php.
Referenced by eZContentClass\fetchAttributeByIdentifier(), eZContentClass\fetchAttributes(), eZContentClass\fetchSearchableAttributes(), eZSiteInstaller\removeClassAttribute(), and eZSiteInstaller\updateClassAttributes().
| static eZContentClassAttribute::fetchList | ( | $ | asObject = true, |
| $ | parameters = array() |
||
| ) | [static] |
Definition at line 402 of file ezcontentclassattribute.php.
Referenced by ezpUrlObjectLinkUpdate\xmlClassAttributeIds().
| static eZContentClassAttribute::fetchListByClassID | ( | $ | classID, |
| $ | version = eZContentClass::VERSION_STATUS_DEFINED, |
||
| $ | asObject = true |
||
| ) | [static] |
Definition at line 449 of file ezcontentclassattribute.php.
Referenced by eZWaitUntilDateType\attribute(), eZContentObject\fetchClassAttributes(), and storeRSSImport().
| eZContentClassAttribute::initializeObjectAttributes | ( | &$ | objects = null | ) |
Initialize the attribute in the existing objects.
| mixed | $objects | not used, the existing objects are fetched if necessary (depending on the datatype of the attribute). |
Definition at line 957 of file ezcontentclassattribute.php.
| eZContentClassAttribute::instantiate | ( | $ | contentobjectID, |
| $ | languageCode = false, |
||
| $ | version = 1 |
||
| ) |
Definition at line 266 of file ezcontentclassattribute.php.
| eZContentClassAttribute::instantiateTemporary | ( | $ | contentobjectID = false | ) |
Definition at line 274 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.
Definition at line 504 of file ezcontentclassattribute.php.
| eZContentClassAttribute::name | ( | $ | languageLocale = false | ) |
Returns name of attribute based on serialized_name_list.
| string | false | $languageLocale | Uses AlwaysAvailable language if false |
Definition at line 708 of file ezcontentclassattribute.php.
| static eZContentClassAttribute::nameFromSerializedString | ( | $ | serializedNameList, |
| $ | languageLocale = false |
||
| ) | [static] |
Returns name from serialized string, can be used for serialized description and data_text as well.
| string | $serializedNameList | |
| string | false | $languageLocale | Uses AlwaysAvailable language if false |
Definition at line 697 of file ezcontentclassattribute.php.
Referenced by eZContentObjectVersion\fetchAttributes().
Returns name list for all locales for attribute.
Definition at line 730 of file ezcontentclassattribute.php.
| eZContentClassAttribute::removeThis | ( | $ | quiet = false | ) |
Definition at line 355 of file ezcontentclassattribute.php.
| eZContentClassAttribute::removeTranslation | ( | $ | languageLocale | ) |
Removes an translation (as in the serilized strings for name, description or data_text_i18n)
| string | $languageLocale |
Definition at line 847 of file ezcontentclassattribute.php.
| eZContentClassAttribute::setAlwaysAvailableLanguage | ( | $ | languageLocale | ) |
Specify AlwaysAvailableLanguage (for name, description or data_text_i18n)
| string | false | $languageLocale |
Definition at line 826 of file ezcontentclassattribute.php.
| eZContentClassAttribute::setContent | ( | $ | content | ) |
Sets the content for the current attribute
Definition at line 547 of file ezcontentclassattribute.php.
| eZContentClassAttribute::setDataTextI18n | ( | $ | string, |
| $ | languageLocale = false |
||
| ) |
Sets data_text_i18n of attribute, store() will take care of writing back to serialized_data_text.
| string | $string | |
| string | false | $languageLocale | Uses AlwaysAvailable language if false |
Definition at line 786 of file ezcontentclassattribute.php.
| eZContentClassAttribute::setDescription | ( | $ | description, |
| $ | languageLocale = false |
||
| ) |
Sets description of attribute, store() will take care of writing back to serialized_description_list.
| string | $description | |
| string | false | $languageLocale | Uses AlwaysAvailable language if false |
Definition at line 753 of file ezcontentclassattribute.php.
| eZContentClassAttribute::setEditLocale | ( | $ | languageLocale = false | ) |
Sets locale code of attribute for use by datatypes in class/edit storing process.
| string | false | $languageLocale | Uses AlwaysAvailable language if false |
Definition at line 816 of file ezcontentclassattribute.php.
| eZContentClassAttribute::setName | ( | $ | name, |
| $ | languageLocale = false |
||
| ) |
Sets name of attribute, store() will take care of writing back to serialized_name_list.
| string | $name | |
| string | false | $languageLocale | Uses AlwaysAvailable language if false |
Definition at line 720 of file ezcontentclassattribute.php.
| static eZContentClassAttribute::sortKeyTypeByID | ( | $ | classAttributeID | ) | [static] |
Definition at line 652 of file ezcontentclassattribute.php.
Referenced by eZContentObjectTreeNode\sortKeyByClassAttributeID().
| eZContentClassAttribute::store | ( | $ | fieldFilters = null | ) |
Stores the object in the database, uses storeObject() to do the actual job and passes $fieldFilters to it.
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.
| array | null | $fieldFilters |
Reimplemented from eZPersistentObject.
Definition at line 279 of file ezcontentclassattribute.php.
Referenced by storeVersioned().
Store the content class in the version status "defined".
Definition at line 311 of file ezcontentclassattribute.php.
| eZContentClassAttribute::storeVersioned | ( | $ | version | ) |
Store the content class in the specified version status.
| int | $version | version status |
Definition at line 326 of file ezcontentclassattribute.php.
Referenced by storeDefined().
| eZContentClassAttribute::$Content |
Contains the content for this attribute.
Definition at line 1120 of file ezcontentclassattribute.php.
| eZContentClassAttribute::$ContentClassID |
Definition at line 1125 of file ezcontentclassattribute.php.
| eZContentClassAttribute::$DataTypeString |
Definition at line 1133 of file ezcontentclassattribute.php.
| eZContentClassAttribute::$DescriptionList |
Definition at line 1132 of file ezcontentclassattribute.php.
| eZContentClassAttribute::$DisplayInfo |
Contains information on how to display the current attribute in various viewmodes.
Definition at line 1122 of file ezcontentclassattribute.php.
eZContentClassAttribute::$EditLocale = false [protected] |
Definition at line 1140 of file ezcontentclassattribute.php.
| eZContentClassAttribute::$ID |
Definition at line 1123 of file ezcontentclassattribute.php.
| eZContentClassAttribute::$Identifier |
Definition at line 1126 of file ezcontentclassattribute.php.
eZContentClassAttribute::$identifierHash = null [static, private] |
In-memory cache for class attributes identifiers / id matching.
Definition at line 1145 of file ezcontentclassattribute.php.
Referenced by classAttributeIDByIdentifier(), classAttributeIdentifierByID(), and classAttributeIdentifiersHash().
| eZContentClassAttribute::$IsInformationCollector |
Definition at line 1137 of file ezcontentclassattribute.php.
| eZContentClassAttribute::$IsRequired |
Definition at line 1136 of file ezcontentclassattribute.php.
| eZContentClassAttribute::$IsSearchable |
Definition at line 1135 of file ezcontentclassattribute.php.
| eZContentClassAttribute::$Module |
Definition at line 1138 of file ezcontentclassattribute.php.
| eZContentClassAttribute::$NameList |
Definition at line 1130 of file ezcontentclassattribute.php.
| eZContentClassAttribute::$Position |
Definition at line 1134 of file ezcontentclassattribute.php.
| eZContentClassAttribute::$SerializedNameList |
Definition at line 1128 of file ezcontentclassattribute.php.
| eZContentClassAttribute::$Version |
Definition at line 1124 of file ezcontentclassattribute.php.