kernel/classes/ezcontentclassattribute.php
File containing the eZContentClassAttribute class.
- Copyright
- Copyright (C) 1999-2011 eZ Systems AS. All rights reserved.
- License
- eZ Business Use License Agreement Version 2.0
- Package
- kernel
- Version
- 4.6.0
\eZContentClassAttribute
File containing the eZContentClassAttribute class.
- Parent(s)
- \eZPersistentObject
- Copyright
- Copyright (C) 1999-2011 eZ Systems AS. All rights reserved.
- License
- eZ Business Use License Agreement Version 2.0
- Version
- 4.6.0
Properties

$PersistentDataDirty= ''
- Type
- n/a
- Inherited_from
- \eZPersistentObject::$$PersistentDataDirty
Methods

attribute(
$attr, $noFunction
=
false
)
:
void| Name | Type | Description |
|---|---|---|
| $attr | ||
| $noFunction |

classAttributeIDByIdentifier(
$identifier
)
:
int | falseResolves the string class attribute identifier $identifier to its numeric value Use {@link eZContentObjectTreeNode::classAttributeIDByIdentifier()} for < 4.1.
If multiple classes have the same identifier, the first found is returned.
| Name | Type | Description |
|---|---|---|
| $identifier |
| Type | Description |
|---|---|
| int | false | Returns classattributeid or false |
- Since
- Version 4.1
- Static

classAttributeIdentifierByID(
$id
)
:
string | falseResolves the numeric class attribute identifier $id to its string value
| Name | Type | Description |
|---|---|---|
| $id |
| Type | Description |
|---|---|
| string | false | Returns classattributeidentifier or false |
- Since
- Version 4.1
- Static

classAttributeIdentifiersHash(
)
:
arrayReturns the class attribute identifier hash for the current database.
If it is outdated or non-existent, the method updates/generates the file
| Type | Description |
|---|---|
| array | Returns hash of classattributeidentifier => classattributeid |
- Access
- protected
- Since
- Version 4.1
- Static

count(
$def, $conds
=
null, $field
=
null
)
:
void
| Name | Type | Description |
|---|---|---|
| $def | ||
| $conds | ||
| $field |

create(
$class_id, $data_type_string, $optionalValues
=
array(), $languageLocale
=
false
)
:
void| Name | Type | Description |
|---|---|---|
| $class_id | ||
| $data_type_string | ||
| $optionalValues | ||
| $languageLocale |

customHTTPAction(
$module, $http, $action
)
:
void| Name | Type | Description |
|---|---|---|
| $module | ||
| $http | ||
| $action |

dataTextI18n(
string | false $languageLocale
=
false
)
:
stringReturns data_text_i18n of attribute based on serialized_data_text
| Name | Type | Description |
|---|---|---|
| $languageLocale | string | false | Uses AlwaysAvailable language if false |
| Type | Description |
|---|---|
| string |

dataTextI18nList(
)
:
arrayReturns data_text_i18n list for all locales for attribute
| Type | Description |
|---|---|
| array |

description(
string | false $languageLocale
=
false
)
:
stringReturns description of attribute based on serialized_description_list
| Name | Type | Description |
|---|---|---|
| $languageLocale | string | false | Uses AlwaysAvailable language if false |
| Type | Description |
|---|---|
| string |

descriptionList(
)
:
arrayReturns description list for all locales for attribute
| Type | Description |
|---|---|
| array |

eZPersistentObject(
$row
)
:
void| Name | Type | Description |
|---|---|---|
| $row |

editLocale(
)
:
string | falseReturns locale code as set with {@link self::setEditLocale()}
| Type | Description |
|---|---|
| string | false |

expireCache(
int $contentClassAttributeID
=
false, int $contentClassID
=
false
)
:
voidClears all content class attribute related caches
| Name | Type | Description |
|---|---|---|
| $contentClassAttributeID | int | Specific attribute ID to clear cache for |
| $contentClassID | int | Specific attribute ID to clear cache for |
- Since
- 4.2

fetch(
$id, $asObject
=
true, $version
=
eZContentClass::VERSION_STATUS_DEFINED, $field_filters
=
null
)
:
void| Name | Type | Description |
|---|---|---|
| $id | ||
| $asObject | ||
| $version | ||
| $field_filters |

fetchFilteredList(
$cond, $asObject
=
true
)
:
void| Name | Type | Description |
|---|---|---|
| $cond | ||
| $asObject |

fetchList(
$asObject
=
true, $parameters
=
array()
)
:
void| Name | Type | Description |
|---|---|---|
| $asObject | ||
| $parameters |

fetchListByClassID(
$classID, $version
=
eZContentClass::VERSION_STATUS_DEFINED, $asObject
=
true
)
:
void| Name | Type | Description |
|---|---|---|
| $classID | ||
| $version | ||
| $asObject |

fetchObject(
$def, $field_filters, $conds, $asObject
=
true, $grouping
=
null, $custom_fields
=
null
)
:
void
| Name | Type | Description |
|---|---|---|
| $def | ||
| $field_filters | ||
| $conds | ||
| $asObject | ||
| $grouping | ||
| $custom_fields |

fetchObjectList(
$def, $field_filters
=
null, $conds
=
null, $sorts
=
null, $limit
=
null, $asObject
=
true, $grouping
=
false, $custom_fields
=
null, $custom_tables
=
null, $custom_conds
=
null
)
:
void
| Name | Type | Description |
|---|---|---|
| $def | ||
| $field_filters | ||
| $conds | ||
| $sorts | ||
| $limit | ||
| $asObject | ||
| $grouping | ||
| $custom_fields | ||
| $custom_tables | ||
| $custom_conds |

fill(
$row
)
:
void| Name | Type | Description |
|---|---|---|
| $row |

getShortAttributeName(
$db, $def, $attrName
)
:
void
| Name | Type | Description |
|---|---|---|
| $db | ||
| $def | ||
| $attrName |

handleRows(
$rows, $class_name, $asObject
)
:
void
| Name | Type | Description |
|---|---|---|
| $rows | ||
| $class_name | ||
| $asObject |

hasAttribute(
$attr
)
:
void| Name | Type | Description |
|---|---|---|
| $attr |

initializeObjectAttributes(
mixed $objects
=
null
)
:
voidInitialize the attribute in the existing objects.
| Name | Type | Description |
|---|---|---|
| $objects | mixed | not used, the existing objects are fetched if necessary (depending on the datatype of the attribute). |

instantiate(
$contentobjectID, $languageCode
=
false, $version
=
1
)
:
void| Name | Type | Description |
|---|---|---|
| $contentobjectID | ||
| $languageCode | ||
| $version |

instantiateTemporary(
$contentobjectID
=
false
)
:
void| Name | Type | Description |
|---|---|---|
| $contentobjectID |

name(
string | false $languageLocale
=
false
)
:
stringReturns name of attribute based on serialized_name_list
| Name | Type | Description |
|---|---|---|
| $languageLocale | string | false | Uses AlwaysAvailable language if false |
| Type | Description |
|---|---|
| string |

nameFromSerializedString(
string $serializedNameList, string | false $languageLocale
=
false
)
:
stringReturns name from serialized string, can be used for serialized description and data_text as well.
| Name | Type | Description |
|---|---|---|
| $serializedNameList | string | |
| $languageLocale | string | false | Uses AlwaysAvailable language if false |
| Type | Description |
|---|---|
| string |

newObjectOrder(
$def, $orderField, $conditions
)
:
void
| Name | Type | Description |
|---|---|---|
| $def | ||
| $orderField | ||
| $conditions |

remove(
$conditions
=
null, $extraConditions
=
null
)
:
void| Name | Type | Description |
|---|---|---|
| $conditions | ||
| $extraConditions |

removeObject(
$def, $conditions
=
null, $extraConditions
=
null
)
:
void
| Name | Type | Description |
|---|---|---|
| $def | ||
| $conditions | ||
| $extraConditions |

removeTranslation(
string $languageLocale
)
:
voidRemoves an translation (as in the serilized strings for name, description or data_text_i18n)
| Name | Type | Description |
|---|---|---|
| $languageLocale | string |

reorderObject(
$def, $orderField, $conditions, $down
=
true
)
:
void
| Name | Type | Description |
|---|---|---|
| $def | ||
| $orderField | ||
| $conditions | ||
| $down |

replaceFieldsWithShortNames(
$db, $fieldDefs, $fields
)
:
void
| Name | Type | Description |
|---|---|---|
| $db | ||
| $fieldDefs | ||
| $fields |

setAlwaysAvailableLanguage(
string | false $languageLocale
)
:
voidSpecify AlwaysAvailableLanguage (for name, description or data_text_i18n)
| Name | Type | Description |
|---|---|---|
| $languageLocale | string | false |

setAttribute(
$attr, $val
)
:
void| Name | Type | Description |
|---|---|---|
| $attr | ||
| $val |

setDataTextI18n(
string $string, string | false $languageLocale
=
false
)
:
stringSets data_text_i18n of attribute, store() will take care of writing back to serialized_data_text
| Name | Type | Description |
|---|---|---|
| $string | string | |
| $languageLocale | string | false | Uses AlwaysAvailable language if false |
| Type | Description |
|---|---|
| string | Return old value |

setDescription(
string $description, string | false $languageLocale
=
false
)
:
stringSets description of attribute, store() will take care of writing back to serialized_description_list
| Name | Type | Description |
|---|---|---|
| $description | string | |
| $languageLocale | string | false | Uses AlwaysAvailable language if false |
| Type | Description |
|---|---|
| string | Return old value |

setEditLocale(
string | false $languageLocale
=
false
)
:
voidSets locale code of attribute for use by datatypes in class/edit storing process.
| Name | Type | Description |
|---|---|---|
| $languageLocale | string | false | Uses AlwaysAvailable language if false |

setHasDirtyData(
$hasDirtyData
)
:
void| Name | Type | Description |
|---|---|---|
| $hasDirtyData |

setName(
string $name, string | false $languageLocale
=
false
)
:
stringSets name of attribute, store() will take care of writing back to serialized_name_list
| Name | Type | Description |
|---|---|---|
| $name | string | |
| $languageLocale | string | false | Uses AlwaysAvailable language if false |
| Type | Description |
|---|---|
| string | Return old value |

sortKeyTypeByID(
$classAttributeID
)
:
void| Name | Type | Description |
|---|---|---|
| $classAttributeID |

storeDefined(
)
:
null | falseStore the content class in the version status "defined".
| Type | Description |
|---|---|
| null | false | false if the operation failed |
- 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.

storeObject(
$obj, $fieldFilters
=
null
)
:
void
| Name | Type | Description |
|---|---|---|
| $obj | ||
| $fieldFilters |

storeVersioned(
int $version
)
:
null | falseStore the content class in the specified version status.
| Name | Type | Description |
|---|---|---|
| $version | int | version status |
| Type | Description |
|---|---|
| null | false | false if the operation failed |
- 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.
- Since
- Version 4.3

swapRow(
$table, $keys, $order_id, $rows, $id1, $id2
)
:
void
| Name | Type | Description |
|---|---|---|
| $table | ||
| $keys | ||
| $order_id | ||
| $rows | ||
| $id1 | ||
| $id2 |

sync(
$fieldFilters
=
null
)
:
void| Name | Type | Description |
|---|---|---|
| $fieldFilters |