Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
eZContentObjectAttribute Class Reference

Encapsulates the data for an object attribute. More...

Inheritance diagram for eZContentObjectAttribute:

## Public Member Functions
| __construct ( $row)
| attribute ( $attr, $noFunction=false)
| fetchAttributeTranslations ( $asObject=true)
| store ( $fieldFilters=null)
| storeData ()
| updateSortKey ( $storeData=true)
| storeNewRow ()
| language ( $languageCode=false, $asObject=true)
| object ()
| objectVersion ()
| contentClassAttribute ()
| setContentClassAttributeIdentifier ( $identifier)
| setContentClassAttributeCanTranslate ( $canTranslate)
| setContentClassAttributeName ( $name)
| contentClassAttributeIsRequired ()
| contentClassAttributeIsInformationCollector ()
| contentClassAttributeName ()
| contentClassAttributeCanTranslate ()
| contentClassAttributeIdentifier ()
| validateInput ( $http, $base, &$inputParameters, $validationParameters=array())
| validateAddToBasket ( $data, &$errors)
| setInputParameters ( $parameters)
| unsetInputParameters ()
| inputParameters ()
| setValidationParameters ( $parameters)
| unsetValidationParameters ()
| validationParameters ()
| validateIsRequired ()
| fixupInput ( $http, $base)
| fetchInput ( $http, $base)
| validateInformation ( $http, $base, &$inputParameters, $validationParameters=array())
| collectInformation ( $collection, &$collectionAttribute, $http, $base)
| customHTTPAction ( $http, $action, $parameters=array())
| handleCustomHTTPActions ( $http, $attributeDataBaseName, $customActionAttributeArray, $customActionParameters)
| onPublish ( $object, $nodes)
| insertHTTPFile ( $object, $objectVersion, $objectLanguage, $httpFile, $mimeData, &$result)
| insertRegularFile ( $object, $objectVersion, $objectLanguage, $filePath, &$result)
| insertSimpleString ( $object, $objectVersion, $objectLanguage, $string, &$result)
| hasStoredFileInformation ( $object, $objectVersion, $objectLanguage)
| storedFileInformation ( $object, $objectVersion, $objectLanguage)
| handleDownload ( $object, $objectVersion, $objectLanguage)
| initialize ( $currentVersion=null, $originalContentObjectAttribute=null)
| postInitialize ( $currentVersion=null, $originalContentObjectAttribute=null)
| removeThis ( $id, $currentVersion=null)
| cloneContentObjectAttribute ( $newVersionNumber, $currentVersionNumber, $contentObjectID=false, $newLanguageCode=false)
| translateTo ( $languageCode, $updateLanguageMask=true)
| dataType ()
| title ()
| classContent ()
| setHTTPValue ( $value)
| value ()
| hasHTTPValue ()
| content ()
| hasContent ()
| metaData ()
| toString ()
| fromString ( $string)
| setContent ( $content)
| displayInfo ()
| classDisplayInfo ()
| contentActionList ()
| setValidationError ()
| setHasValidationError ( $hasError=true)
| hasValidationError ()
| setValidationLog ( $text)
| validationError ()
| validationLog ()
| serialize ( $package)
| unserialize ( $package, $attributeDOMNode)
| postUnserialize ( $package)
| isA ()
| viewTemplateName ()
| editTemplateName ()
| viewTemplate ()
| editTemplate ()
| informationTemplate ()
| resultTemplate ()
Public Member Functions inherited from eZPersistentObject
| eZPersistentObject ( $row=null)
| fill ( $row)
| remove ( $conditions=null, $extraConditions=null)
| sync ( $fieldFilters=null)
| attributes ()
| hasAttribute ( $attr)
| setAttribute ( $attr, $val)
| hasDirtyData ()
| setHasDirtyData ( $hasDirtyData)

## Static Public Member Functions
static | definition ()
static | fetch ( $id, $version, $asObject=true, $field_filters=null)
static | fetchListByClassID ( $id, $version=false, $limit=null, $asObject=true, $asCount=false)
static | fetchByClassAttributeID ( $classAttributeID, $objectID, $version, $languageID, $asObject=true)
static | fetchSameClassAttributeIDList ( $contentClassAttributeID, $asObject=true, $version=false, $contentObjectID=false, $limit=null)
static | create ( $contentclassAttributeID, $contentobjectID, $version=1, $languageCode=false)
static | fetchByIdentifier ( $identifier, $asObject=true)
static | metaDataArray (&$attributes, $skipRelationAttributes=false)
static | generateValidationErrorText ( $numargs, $argList)
static | removeRelationsByContentClassAttributeId ( $attributeId)
Static Public Member Functions inherited from eZPersistentObject
static | replaceFieldsWithShortNames (eZDBInterface $db, array $fieldDefs, &$fields)
static | count ( $def, $conds=null, $field=null)
static | fetchObject ( $def, $field_filters, $conds, $asObject=true, $grouping=null, $custom_fields=null)
static | removeObject ( $def, $conditions=null, $extraConditions=null)
static | storeObject ( $obj, $fieldFilters=null)
static | conditionText ( $conditions)
static | conditionTextByRow ( $conditions, $row)
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 | handleRows ( $rows, $class_name, $asObject)
static | swapRow ( $table, $keys, $order_id, $rows, $id1, $id2)
static | newObjectOrder ( $def, $orderField, $conditions)
static | reorderObject ( $def, $orderField, $conditions, $down=true)
static | escapeArray ( $array)
static | updateObjectList ( $parameters)
static | getShortAttributeName ( $db, $def, $attrName)

## Public Attributes
| $AddToBasketIsValid
| $HTTPValue
| Contains the value(s) submitted in HTTP form. More...
| $Content
| Contains the content for this attribute. More...
| $DisplayInfo
| Contains information on how to display the current attribute in various viewmodes. More...
| $IsValid
| Stores the is valid. More...
| $ContentClassAttributeID
| $ValidationError
| Contains the last validation error. More...
| $ValidationLog
| Contains the last validation error. More...
| $ContentClassAttributeIdentifier
| $ContentClassAttributeCanTranslate
| $ContentClassAttributeName
| $ContentClassAttributeIsInformationCollector
| $ContentClassAttributeIsRequired
| $ValidationParameters = array()
| $InputParameters
| $HasValidationError
| $DataTypeCustom
| $DataTypeString
| $Version
| $LanguageCode
| $LanguageID
| $AttributeOriginalID
| $SortKeyInt
| $SortKeyString
| $DataText
| $DataInt
| $DataFloat
Public Attributes inherited from eZPersistentObject
| $PersistentDataDirty
| $ID
| $ContentObjectID
| $SectionID
| $OwnerID
| $ClassID
| $Published
| $Modified
| $CurrentVersion
| $Status
| $RemoteID
| $LanguageMask
| $InitialLanguageID
| $NodeID
| $ParentNodeID
| $MainNodeID
| $ContentObjectVersion
| $ContentObjectIsPublished
| $Depth
| $SortField
| $SortOrder
| $Priority
| $ModifiedSubNode
| $PathString
| $PathIdentificationString
| $IsHidden
| $IsInvisible
| $UserID
| $Name
| $Locale
| $Identifier
| $NavigationPartIdentifier
| $SerializedDescriptionList
| $URLAliasName
| $AlwaysAvailable
| $CanTranslate
| $DataInt1
| $DataInt2
| $DataInt3
| $DataInt4
| $DataFloat1
| $DataFloat2
| $DataFloat3
| $DataFloat4
| $DataText1
| $DataText2
| $DataText3
| $DataText4
| $DataText5
| $SerializedDataText
| $Category
| $PolicyID
| $Values
| $Created
| $CurrencyCode
| $ProductCollectionID
| $ItemCount
| $Price
| $IsVATIncluded
| $VATValue
| $DiscountValue
| $Email
| $IsTemporary
| $IsArchived
| $IsActive
| $OrderID
| $ModifierID
| $Code
| $Symbol
| $AutoRateValue
| $CustomRateValue
| $RateFactor
| $Main
| $MementoKey
| $MainKey
| $WorkflowEventPos
| $LanguageID
| $ContentObjectStateGroupID
| $contentobject_attribute_id
| $contentobject_id
| $rating
| $rating_count
| $rating_average

## Additional Inherited Members
Static Protected Member Functions inherited from eZPersistentObject
static | replaceFieldsWithLongNames (eZDBInterface $db, array $fieldDefs, &$fields)

## Detailed Description

Encapsulates the data for an object attribute.

See also
  eZContentObject eZContentClass eZContentClassAttribute

Definition at line 19 of file ezcontentobjectattribute.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZContentObjectAttribute::__construct | ( |  | $row | ) |

Initializes the object with the $row.

It will try to set each field taken from the database row. Calls fill to do the job. If $row is an integer, it will try to fetch it from the database using it as the unique ID.

Parameters

  int | array | $row |

Reimplemented from eZPersistentObject.

Definition at line 22 of file ezcontentobjectattribute.php.

## Member Function Documentation

## ◆ attribute()

eZContentObjectAttribute::attribute | ( |  | $attr,
|  |  | $noFunction = `false`
| ) |  |

Returns the attribute data for $attr, this is either returned from the member variables or a member function depending on whether the definition field or function attributes matched.

Parameters

  string | $attr |
  bool | $noFunction |

Returns
  mixed

Reimplemented from eZPersistentObject.

Definition at line 229 of file ezcontentobjectattribute.php.

Referenced by collectInformation(), eZBinaryFileType\isDeletingFile(), and translateTo().

## ◆ classContent()

eZContentObjectAttribute::classContent | ( |  | ) |

Returns
  the content for the contentclass attribute which defines this contentobject attribute.

Definition at line 1089 of file ezcontentobjectattribute.php.

References contentClassAttribute().

## ◆ classDisplayInfo()

eZContentObjectAttribute::classDisplayInfo | ( |  | ) |

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

Note
  This is a copy of eZContentClassAttribute::displayInfo()

Definition at line 1260 of file ezcontentobjectattribute.php.

References contentClassAttribute(), and dataType().

## ◆ cloneContentObjectAttribute()

eZContentObjectAttribute::cloneContentObjectAttribute | ( |  | $newVersionNumber,
|  |  | $currentVersionNumber,
|  |  | $contentObjectID = `false`,
|  |  | $newLanguageCode = `false`
| ) |  |

Clones the attribute to a new version

Parameters

  int | $newVersionNumber | Target version number
  int | $currentVersionNumnber | Source version number
  int | $contentObjectID |
  string | $newLanguageCode |

Note
  The cloned attribute isn't stored automatically

Returns
  eZContentObjectAttribute The cloned attribute

Todo:
  Deprecate this in favor of a real __clone

Definition at line 957 of file ezcontentobjectattribute.php.

References definition(), eZPersistentObject\fetchObject(), eZContentLanguage\idByLocale(), and eZDB\instance().

## ◆ collectInformation()

eZContentObjectAttribute::collectInformation | ( |  | $collection,
|  | & | $collectionAttribute,
|  |  | $http,
|  |  | $base
| ) |  |

Collects the information entered by the user from http post vars

Definition at line 714 of file ezcontentobjectattribute.php.

References attribute(), and dataType().

## ◆ content()

eZContentObjectAttribute::content | ( |  | ) |

Returns the content for this attribute.

Definition at line 1129 of file ezcontentobjectattribute.php.

References $Content, and dataType().

Referenced by value().

## ◆ contentActionList()

eZContentObjectAttribute::contentActionList | ( |  | ) |

Returns the content action(s) for this attribute

Definition at line 1277 of file ezcontentobjectattribute.php.

References contentClassAttribute(), and dataType().

## ◆ contentClassAttribute()

eZContentObjectAttribute::contentClassAttribute | ( |  | ) |

Returns the attribute for the current data attribute instance

Definition at line 440 of file ezcontentobjectattribute.php.

References eZDebug\accumulatorStart(), eZDebug\accumulatorStop(), and eZContentClassAttribute\fetch().

Referenced by classContent(), classDisplayInfo(), contentActionList(), initialize(), postInitialize(), store(), storeData(), updateSortKey(), validateIsRequired(), and viewTemplateName().

## ◆ contentClassAttributeCanTranslate()

eZContentObjectAttribute::contentClassAttributeCanTranslate | ( |  | ) |

Returns
  the cached value if the attribute can be translated or not

Definition at line 526 of file ezcontentobjectattribute.php.

References $ContentClassAttributeCanTranslate, eZDebug\accumulatorStart(), eZDebug\accumulatorStop(), and eZContentClassAttribute\fetch().

## ◆ contentClassAttributeIdentifier()

eZContentObjectAttribute::contentClassAttributeIdentifier | ( |  | ) |

Returns
  the idenfifier for the content class attribute

Definition at line 553 of file ezcontentobjectattribute.php.

References $ContentClassAttributeIdentifier, and eZContentClassAttribute\classAttributeIdentifierByID().

## ◆ contentClassAttributeIsInformationCollector()

eZContentObjectAttribute::contentClassAttributeIsInformationCollector | ( |  | ) |

Returns
  the cached value of the is_informationcollector value

Definition at line 492 of file ezcontentobjectattribute.php.

References $ContentClassAttributeIsInformationCollector, eZDebug\accumulatorStart(), eZDebug\accumulatorStop(), and eZContentClassAttribute\fetch().

## ◆ contentClassAttributeIsRequired()

eZContentObjectAttribute::contentClassAttributeIsRequired | ( |  | ) |

Returns
  the cached value of the IsRequired value

Definition at line 475 of file ezcontentobjectattribute.php.

References $ContentClassAttributeIsRequired, eZDebug\accumulatorStart(), eZDebug\accumulatorStop(), and eZContentClassAttribute\fetch().

## ◆ contentClassAttributeName()

eZContentObjectAttribute::contentClassAttributeName | ( |  | ) |

Returns
  the cached value of the class attribute name

Definition at line 509 of file ezcontentobjectattribute.php.

References $ContentClassAttributeName, eZDebug\accumulatorStart(), eZDebug\accumulatorStop(), and eZContentClassAttribute\fetch().

## ◆ create()

static eZContentObjectAttribute::create | ( |  | $contentclassAttributeID,
|  |  | $contentobjectID,
|  |  | $version = `1`,
|  |  | $languageCode = `false`
| ) |  |
| static

Definition at line 254 of file ezcontentobjectattribute.php.

References eZContentObject\defaultLanguage(), and eZContentLanguage\idByLocale().

Referenced by eZSiteInstaller\addClassAttributes(), eZContentClassAttribute\initializeObjectAttributes(), eZContentClassAttribute\instantiate(), and eZContentClassAttribute\instantiateTemporary().

## ◆ customHTTPAction()

eZContentObjectAttribute::customHTTPAction | ( |  | $http,
|  |  | $action,
|  |  | $parameters = `array()`
| ) |  |

Executes the custom HTTP action

Definition at line 731 of file ezcontentobjectattribute.php.

References dataType().

## ◆ dataType()

eZContentObjectAttribute::dataType | ( |  | ) |

Returns the data type class for the current attribute.

Returns
  eZDataType

Definition at line 1065 of file ezcontentobjectattribute.php.

References eZDataType\create().

Referenced by classDisplayInfo(), collectInformation(), content(), contentActionList(), customHTTPAction(), displayInfo(), editTemplate(), fetchInput(), fixupInput(), fromString(), handleCustomHTTPActions(), handleDownload(), hasContent(), hasStoredFileInformation(), informationTemplate(), insertHTTPFile(), insertRegularFile(), insertSimpleString(), isA(), metaData(), onPublish(), postUnserialize(), removeThis(), resultTemplate(), serialize(), storedFileInformation(), title(), toString(), unserialize(), validateAddToBasket(), validateInformation(), validateInput(), and viewTemplate().

## ◆ definition()

static eZContentObjectAttribute::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:

- 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: `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" ); }`

Returns
  array

Reimplemented from eZPersistentObject.

Definition at line 38 of file ezcontentobjectattribute.php.

Referenced by eZContentObject\allContentObjectAttributes(), cloneContentObjectAttribute(), eZContentObjectTreeNodeOperations\copySubtree(), fetch(), fetchAttributeTranslations(), fetchByClassAttributeID(), eZMedia\fetchByContentObjectID(), fetchByIdentifier(), eZImageFile\fetchImageAttributesByFilepath(), fetchListByClassID(), fetchSameClassAttributeIDList(), language(), eZObjectRelationListType\removeRelationObject(), removeThis(), and eZISBN10To13Converter\updateContentFromClassAttribute().

## ◆ displayInfo()

eZContentObjectAttribute::displayInfo | ( |  | ) |

Returns
  Information on how to display the current attribute. See eZDataType::objectDisplayInformation() for more information on what is returned.

Definition at line 1244 of file ezcontentobjectattribute.php.

References $DisplayInfo, and dataType().

## ◆ editTemplate()

eZContentObjectAttribute::editTemplate | ( |  | ) |

Returns
  the template name to use for editing the attribute.

Note
  The returned template name does not include the .tpl extension.

See also
  viewTemplate, informationTemplate

Definition at line 1444 of file ezcontentobjectattribute.php.

References dataType().

Referenced by editTemplateName().

## ◆ editTemplateName()

eZContentObjectAttribute::editTemplateName | ( |  | ) |

Returns
  the template name to use for editing the attribute.

Definition at line 1415 of file ezcontentobjectattribute.php.

References editTemplate().

## ◆ fetch()

static eZContentObjectAttribute::fetch | ( |  | $id,
|  |  | $version,
|  |  | $asObject = `true`,
|  |  | $field_filters = `null`
| ) |  |
| static

Definition at line 136 of file ezcontentobjectattribute.php.

References definition(), and eZPersistentObject\fetchObject().

Referenced by eZProductCollectionItem\calculatePriceWithOptions(), eZURLObjectLink\clearCacheForObjectLink(), eZInformationCollectionAttribute\contentObjectAttribute(), eZURLObjectLink\fetchObjectVersionList(), eZImageAliasHandler\initializeFromFile(), eZContentObjectVersion\nonTranslatableAttributesToUpdate(), and eZImageAliasHandler\storeDOMTree().

## ◆ fetchAttributeTranslations()

eZContentObjectAttribute::fetchAttributeTranslations | ( |  | $asObject = `true` | ) |

Returns
  the attributes with alternative translations for the current attribute version and class attribute id

Definition at line 242 of file ezcontentobjectattribute.php.

References definition(), and eZPersistentObject\fetchObjectList().

## ◆ fetchByClassAttributeID()

static eZContentObjectAttribute::fetchByClassAttributeID | ( |  | $classAttributeID,
|  |  | $objectID,
|  |  | $version,
|  |  | $languageID,
|  |  | $asObject = `true`
| ) |  |
| static

Definition at line 182 of file ezcontentobjectattribute.php.

References definition(), and eZPersistentObject\fetchObject().

Referenced by eZContentObject\copyVersion().

## ◆ fetchByIdentifier()

static eZContentObjectAttribute::fetchByIdentifier | ( |  | $identifier,
|  |  | $asObject = `true`
| ) |  |
| static

Fetch a node by identifier (unique data_text )

Parameters

  identifier |

Returns
  object attribute

Definition at line 395 of file ezcontentobjectattribute.php.

References definition(), and eZPersistentObject\fetchObject().

## ◆ fetchInput()

eZContentObjectAttribute::fetchInput | ( |  | $http,
|  |  | $base
| ) |  |

Fetches the data from http post vars and sets them correctly.

Definition at line 684 of file ezcontentobjectattribute.php.

References dataType().

## ◆ fetchListByClassID()

static eZContentObjectAttribute::fetchListByClassID | ( |  | $id,
|  |  | $version = `false`,
|  |  | $limit = `null`,
|  |  | $asObject = `true`,
|  |  | $asCount = `false`
| ) |  |
| static

Definition at line 145 of file ezcontentobjectattribute.php.

References definition(), and eZPersistentObject\fetchObjectList().

## ◆ fetchSameClassAttributeIDList()

static eZContentObjectAttribute::fetchSameClassAttributeIDList | ( |  | $contentClassAttributeID,
|  |  | $asObject = `true`,
|  |  | $version = `false`,
|  |  | $contentObjectID = `false`,
|  |  | $limit = `null`
| ) |  |
| static

Fetches all contentobject attributes which relate to the contentclass attribute $contentClassAttributeID.

Parameters

  int | $contentClassAttributeID | The ID of the contentclass attribute
  bool | $asObject | If true objects will be returned, otherwise associative arrays are returned.
  int | bool | $version | The version the of contentobject attributes to fetch, or all versions if false.
  int | bool | $contentObjectID | The ID the of contentobject to fetch, or all objects if false.
  array | null | $limit | An associative array with limitiations, can contain 'offset': Numerical value defining the start offset for the fetch 'length': Numerical value defining the max number of items to return

Returns
  eZContentObjectAttribute[]|array|null An array with contentobject attributes.

Definition at line 205 of file ezcontentobjectattribute.php.

References definition(), and eZPersistentObject\fetchObjectList().

Referenced by eZSiteInstaller\removeClassAttribute().

## ◆ fixupInput()

eZContentObjectAttribute::fixupInput | ( |  | $http,
|  |  | $base
| ) |  |

Tries to fixup the input text to be acceptable. �

Definition at line 674 of file ezcontentobjectattribute.php.

References dataType().

## ◆ fromString()

eZContentObjectAttribute::fromString | ( |  | $string | ) |

imports string to attribute content used for simplified import/export.

Definition at line 1183 of file ezcontentobjectattribute.php.

References dataType().

## ◆ generateValidationErrorText()

static eZContentObjectAttribute::generateValidationErrorText | ( |  | $numargs,
|  |  | $argList
| ) |  |
| static

Definition at line 1311 of file ezcontentobjectattribute.php.

Referenced by setValidationError().

## ◆ handleCustomHTTPActions()

eZContentObjectAttribute::handleCustomHTTPActions | ( |  | $http,
|  |  | $attributeDataBaseName,
|  |  | $customActionAttributeArray,
|  |  | $customActionParameters
| ) |  |

Sends custom actions to datatype for custom handling.

Definition at line 741 of file ezcontentobjectattribute.php.

References dataType().

## ◆ handleDownload()

eZContentObjectAttribute::handleDownload | ( |  | $object,
|  |  | $objectVersion,
|  |  | $objectLanguage
| ) |  |

Calls handleDownload() on the current datatype and returns the result.

Definition at line 874 of file ezcontentobjectattribute.php.

References dataType(), and object().

## ◆ hasContent()

eZContentObjectAttribute::hasContent | ( |  | ) |

Returns
  `true` if the attribute is considered to have any content at all (ie. non-empty).

It will call the hasObjectAttributeContent() for the current datatype to figure this out.

Definition at line 1145 of file ezcontentobjectattribute.php.

References dataType().

## ◆ hasHTTPValue()

eZContentObjectAttribute::hasHTTPValue | ( |  | ) |

Returns
  `true` if the attribute has relavant value(s) submitted in HTTP form.

Definition at line 1117 of file ezcontentobjectattribute.php.

## ◆ hasStoredFileInformation()

eZContentObjectAttribute::hasStoredFileInformation | ( |  | $object,
|  |  | $objectVersion,
|  |  | $objectLanguage
| ) |  |

Calls hasStoredFileInformation() on the current datatype and returns the result.

Definition at line 842 of file ezcontentobjectattribute.php.

References dataType(), and object().

## ◆ hasValidationError()

eZContentObjectAttribute::hasValidationError | ( |  | ) |

Definition at line 1306 of file ezcontentobjectattribute.php.

References $HasValidationError.

## ◆ informationTemplate()

eZContentObjectAttribute::informationTemplate | ( |  | ) |

Returns
  the template name to use for information collection for the attribute.

Note
  The returned template name does not include the .tpl extension.

See also
  viewTemplate, editTemplate

Definition at line 1459 of file ezcontentobjectattribute.php.

References dataType().

Referenced by viewTemplateName().

## ◆ initialize()

eZContentObjectAttribute::initialize | ( |  | $currentVersion = `null`,
|  |  | $originalContentObjectAttribute = `null`
| ) |  |

Initializes the attribute by using the datatype

Parameters

  int | $currentVersion | Current version number
  eZContentObjectAttribute | $originalContentObjectAttribute | Optional eZContentObjectAttribute the content will be initialized from

Returns
  void

Definition at line 896 of file ezcontentobjectattribute.php.

References contentClassAttribute().

## ◆ inputParameters()

eZContentObjectAttribute::inputParameters | ( |  | ) |

Returns
  the current input parameters or `false` if no parameters has been set.

See also
  setInputParameters, unsetInputParameters

Definition at line 622 of file ezcontentobjectattribute.php.

References $InputParameters.

## ◆ insertHTTPFile()

eZContentObjectAttribute::insertHTTPFile | ( |  | $object,
|  |  | $objectVersion,
|  |  | $objectLanguage,
|  |  | $httpFile,
|  |  | $mimeData,
|  | & | $result
| ) |  |

Inserts the HTTP file $httpFile to the content object attribute $objectAttribute by calling eZDataType::insertHTTPFile on the current datatype.

The parameters are passed directly to the datatype with the exception of $object, $objectVersion and $objectLanguage. If `false` is passed to any of these parameters they will be fetched from the current attribute, if these are available it is adviced to pass them since it will save time.

Definition at line 773 of file ezcontentobjectattribute.php.

References dataType(), and object().

## ◆ insertRegularFile()

eZContentObjectAttribute::insertRegularFile | ( |  | $object,
|  |  | $objectVersion,
|  |  | $objectLanguage,
|  |  | $filePath,
|  | & | $result
| ) |  |

Inserts the file named $filePath to the content object attribute $objectAttribute. by calling eZDataType::insertRegularFile on the current datatype.

The parameters are passed directly to the datatype with the exception of $object, $objectVersion and $objectLanguage. If `false` is passed to any of these parameters they will be fetched from the current attribute, if these are available it is adviced to pass them since it will save time.

Definition at line 798 of file ezcontentobjectattribute.php.

References dataType(), and object().

## ◆ insertSimpleString()

eZContentObjectAttribute::insertSimpleString | ( |  | $object,
|  |  | $objectVersion,
|  |  | $objectLanguage,
|  |  | $string,
|  | & | $result
| ) |  |

Inserts the string $string to the content object attribute $objectAttribute. by calling eZDataType::insertSimpleString on the current datatype.

The parameters are passed directly to the datatype with the exception of $object, $objectVersion and $objectLanguage. If `false` is passed to any of these parameters they will be fetched from the current attribute, if these are available it is adviced to pass them since it will save time.

Definition at line 823 of file ezcontentobjectattribute.php.

References dataType(), and object().

## ◆ isA()

eZContentObjectAttribute::isA | ( |  | ) |

Definition at line 1380 of file ezcontentobjectattribute.php.

References dataType().

## ◆ language()

eZContentObjectAttribute::language | ( |  | $languageCode = `false`,
|  |  | $asObject = `true`
| ) |  |

Definition at line 403 of file ezcontentobjectattribute.php.

References definition(), eZPersistentObject\fetchObject(), and object().

## ◆ metaData()

eZContentObjectAttribute::metaData | ( |  | ) |

Returns the metadata. This is the pure content of the attribute used for indexing data for search engines.

Definition at line 1159 of file ezcontentobjectattribute.php.

References dataType().

## ◆ metaDataArray()

static eZContentObjectAttribute::metaDataArray | ( | & | $attributes,
|  |  | $skipRelationAttributes = `false`
| ) |  |
| static

Goes trough all attributes and fetches metadata for the ones that is searchable.

Returns
  an array with metadata information.

Definition at line 1198 of file ezcontentobjectattribute.php.

Referenced by eZObjectRelationType\metaData(), and eZObjectRelationListType\metaData().

## ◆ object()

eZContentObjectAttribute::object | ( |  | ) |

Definition at line 423 of file ezcontentobjectattribute.php.

References eZContentObject\fetch().

Referenced by handleDownload(), hasStoredFileInformation(), insertHTTPFile(), insertRegularFile(), insertSimpleString(), language(), and storedFileInformation().

## ◆ objectVersion()

eZContentObjectAttribute::objectVersion | ( |  | ) |

Definition at line 432 of file ezcontentobjectattribute.php.

References eZContentObjectVersion\fetchVersion().

## ◆ onPublish()

eZContentObjectAttribute::onPublish | ( |  | $object,
|  |  | $nodes
| ) |  |

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 757 of file ezcontentobjectattribute.php.

References dataType().

## ◆ postInitialize()

eZContentObjectAttribute::postInitialize | ( |  | $currentVersion = `null`,
|  |  | $originalContentObjectAttribute = `null`
| ) |  |

Initialized the attribute by using the datatype after the actual attribute is stored.

Definition at line 909 of file ezcontentobjectattribute.php.

References contentClassAttribute().

## ◆ postUnserialize()

eZContentObjectAttribute::postUnserialize | ( |  | $package | ) |

Definition at line 1367 of file ezcontentobjectattribute.php.

References dataType(), and store().

## ◆ removeRelationsByContentClassAttributeId()

static eZContentObjectAttribute::removeRelationsByContentClassAttributeId | ( |  | $attributeId | ) |
| static

Removes all links for a given Class Attribute Id.

Parameters

  int | $attributeId |

Definition at line 1494 of file ezcontentobjectattribute.php.

References eZDB\instance().

Referenced by eZObjectRelationType\deleteNotVersionedStoredClassAttribute(), and eZObjectRelationListType\deleteNotVersionedStoredClassAttribute().

## ◆ removeThis()

eZContentObjectAttribute::removeThis | ( |  | $id,
|  |  | $currentVersion = `null`
| ) |  |

Remove the attribute $id by using the datatype.

Parameters

  int | $id |
  int | $currentVersion | Version number to remove the attribute for. If null, all versions are removed.

Definition at line 924 of file ezcontentobjectattribute.php.

References dataType(), definition(), and eZPersistentObject\removeObject().

## ◆ resultTemplate()

eZContentObjectAttribute::resultTemplate | ( |  | ) |

Returns
  the template name to use for information collection result view for the attribute.

Note
  The returned template name does not include the .tpl extension.

See also
  viewTemplate, editTemplate, informationTemplate

Definition at line 1477 of file ezcontentobjectattribute.php.

References dataType().

## ◆ serialize()

eZContentObjectAttribute::serialize | ( |  | $package | ) |

Definition at line 1350 of file ezcontentobjectattribute.php.

References dataType().

## ◆ setContent()

eZContentObjectAttribute::setContent | ( |  | $content | ) |

Sets the content for the current attribute

Definition at line 1235 of file ezcontentobjectattribute.php.

## ◆ setContentClassAttributeCanTranslate()

eZContentObjectAttribute::setContentClassAttributeCanTranslate | ( |  | $canTranslate | ) |

Sets the cached content class attribute can_translate

Definition at line 459 of file ezcontentobjectattribute.php.

## ◆ setContentClassAttributeIdentifier()

eZContentObjectAttribute::setContentClassAttributeIdentifier | ( |  | $identifier | ) |

Sets the cached content class attribute identifier

Definition at line 451 of file ezcontentobjectattribute.php.

## ◆ setContentClassAttributeName()

eZContentObjectAttribute::setContentClassAttributeName | ( |  | $name | ) |

Sets the cached content class attribute name

Definition at line 467 of file ezcontentobjectattribute.php.

## ◆ setHasValidationError()

eZContentObjectAttribute::setHasValidationError | ( |  | $hasError = `true` | ) |

Definition at line 1301 of file ezcontentobjectattribute.php.

## ◆ setHTTPValue()

eZContentObjectAttribute::setHTTPValue | ( |  | $value | ) |

Sets the content of variable for the content of the relevant value(s) submitted in HTTP form.

Definition at line 1098 of file ezcontentobjectattribute.php.

## ◆ setInputParameters()

eZContentObjectAttribute::setInputParameters | ( |  | $parameters | ) |

Sets the current input parameters to $parameters. The input parameters are set by validateInput() and made avaiable to datatypes trough the function inputParameters().

Note
  The input parameters will only be available for the duration of validateInput().

See also
  inputParameters

Definition at line 603 of file ezcontentobjectattribute.php.

Referenced by validateInformation(), and validateInput().

## ◆ setValidationError()

eZContentObjectAttribute::setValidationError | ( |  | ) |

Definition at line 1287 of file ezcontentobjectattribute.php.

References generateValidationErrorText().

## ◆ setValidationLog()

eZContentObjectAttribute::setValidationLog | ( |  | $text | ) |

Definition at line 1322 of file ezcontentobjectattribute.php.

## ◆ setValidationParameters()

eZContentObjectAttribute::setValidationParameters | ( |  | $parameters | ) |

Sets the current validation parameters to $parameters. The validation parameters are set by validateInput() and made avaiable to datatypes trough the function validationParameters().

Note
  The validation parameters will only be available for the duration of validateInput().

See also
  validationParameters

Definition at line 634 of file ezcontentobjectattribute.php.

Referenced by validateInformation(), and validateInput().

## ◆ store()

eZContentObjectAttribute::store | ( |  | $fieldFilters = `null` | ) |

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.

Reimplemented from eZPersistentObject.

Definition at line 280 of file ezcontentobjectattribute.php.

References contentClassAttribute(), eZDB\instance(), eZPersistentObject\setAttribute(), and updateSortKey().

Referenced by postUnserialize().

## ◆ storeData()

eZContentObjectAttribute::storeData | ( |  | ) |

Similar to store() but does not call eZDataType::storeObjectAttribute().

If you have some datatype code that needs to store attribute data you should call this instead of store(), this function will avoid infinite recursion.

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 316 of file ezcontentobjectattribute.php.

References contentClassAttribute(), eZPersistentObject\setAttribute(), and updateSortKey().

## ◆ storedFileInformation()

eZContentObjectAttribute::storedFileInformation | ( |  | $object,
|  |  | $objectVersion,
|  |  | $objectLanguage
| ) |  |

Calls storedFileInformation() on the current datatype and returns the result.

Definition at line 858 of file ezcontentobjectattribute.php.

References dataType(), and object().

## ◆ storeNewRow()

eZContentObjectAttribute::storeNewRow | ( |  | ) |

Store one row into content attribute table

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 383 of file ezcontentobjectattribute.php.

## ◆ title()

eZContentObjectAttribute::title | ( |  | ) |

Fetches the title of the data instance which is to form the title of the object.

Definition at line 1077 of file ezcontentobjectattribute.php.

References dataType().

## ◆ toString()

eZContentObjectAttribute::toString | ( |  | ) |

Returns the string representation of attribute. This is the pure content of the attribute in string representation used for simplified import/export.

Definition at line 1171 of file ezcontentobjectattribute.php.

References dataType().

## ◆ translateTo()

eZContentObjectAttribute::translateTo | ( |  | $languageCode,
|  |  | $updateLanguageMask = `true`
| ) |  |

Clones the attribute to the translation $languageCode.

Note
  The cloned attribute is not stored.
  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.
  Deprecated.

Definition at line 1031 of file ezcontentobjectattribute.php.

References attribute(), eZContentLanguage\idByLocale(), and eZDB\instance().

## ◆ unserialize()

eZContentObjectAttribute::unserialize | ( |  | $package,
|  |  | $attributeDOMNode
| ) |  |

Definition at line 1360 of file ezcontentobjectattribute.php.

References dataType().

## ◆ unsetInputParameters()

eZContentObjectAttribute::unsetInputParameters | ( |  | ) |

Unsets the input parameters previously set by setInputParameters().

See also
  inputParameters

Definition at line 612 of file ezcontentobjectattribute.php.

Referenced by validateInformation(), and validateInput().

## ◆ unsetValidationParameters()

eZContentObjectAttribute::unsetValidationParameters | ( |  | ) |

Unsets the validation parameters previously set by setValidationParameters().

See also
  validationParameters

Definition at line 643 of file ezcontentobjectattribute.php.

Referenced by validateInformation(), and validateInput().

## ◆ updateSortKey()

eZContentObjectAttribute::updateSortKey | ( |  | $storeData = `true` | ) |

Copies the sort key value from the attribute according to the datatype rules.

Note
  The attribute is not stored
  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 341 of file ezcontentobjectattribute.php.

References contentClassAttribute(), and eZPersistentObject\setAttribute().

Referenced by store(), and storeData().

## ◆ validateAddToBasket()

eZContentObjectAttribute::validateAddToBasket | ( |  | $data,
|  | & | $errors
| ) |  |

Validates the data contents, returns true on success false if the data does not validate.

Definition at line 586 of file ezcontentobjectattribute.php.

References $AddToBasketIsValid, and dataType().

## ◆ validateInformation()

eZContentObjectAttribute::validateInformation | ( |  | $http,
|  |  | $base,
|  | & | $inputParameters,
|  |  | $validationParameters = `array()`
| ) |  |

Validates the information collection data. �

Definition at line 696 of file ezcontentobjectattribute.php.

References $IsValid, dataType(), setInputParameters(), setValidationParameters(), unsetInputParameters(), and unsetValidationParameters().

## ◆ validateInput()

eZContentObjectAttribute::validateInput | ( |  | $http,
|  |  | $base,
|  | & | $inputParameters,
|  |  | $validationParameters = `array()`
| ) |  |

Validates the data contents, returns true on success false if the data does not validate.

Definition at line 567 of file ezcontentobjectattribute.php.

References $IsValid, dataType(), setInputParameters(), setValidationParameters(), unsetInputParameters(), and unsetValidationParameters().

## ◆ validateIsRequired()

eZContentObjectAttribute::validateIsRequired | ( |  | ) |

Returns
  `true` if 'is_required' validation should be done otherwise `false`;

Definition at line 661 of file ezcontentobjectattribute.php.

References contentClassAttribute(), and validationParameters().

## ◆ validationError()

eZContentObjectAttribute::validationError | ( |  | ) |

Definition at line 1340 of file ezcontentobjectattribute.php.

References $ValidationError.

## ◆ validationLog()

eZContentObjectAttribute::validationLog | ( |  | ) |

Definition at line 1345 of file ezcontentobjectattribute.php.

References $ValidationLog.

## ◆ validationParameters()

eZContentObjectAttribute::validationParameters | ( |  | ) |

Returns
  the current validation parameters or `false` if no parameters has been set.

See also
  setValidationParameters, unsetValidationParameters

Definition at line 653 of file ezcontentobjectattribute.php.

References $ValidationParameters.

Referenced by validateIsRequired().

## ◆ value()

eZContentObjectAttribute::value | ( |  | ) |

Returns the content of the relevant value(s) submitted in HTTP form.

Definition at line 1106 of file ezcontentobjectattribute.php.

References $HTTPValue, and content().

## ◆ viewTemplate()

eZContentObjectAttribute::viewTemplate | ( |  | ) |

Returns
  the template name to use for viewing the attribute.

Note
  The returned template name does not include the .tpl extension.

See also
  editTemplate, informationTemplate

Definition at line 1425 of file ezcontentobjectattribute.php.

References dataType().

Referenced by viewTemplateName().

## ◆ viewTemplateName()

eZContentObjectAttribute::viewTemplateName | ( |  | ) |

Returns
  the template name to use for viewing the attribute or if the attribute is an information collector the information template name is returned.

Note
  The returned template name does not include the .tpl extension.

See also
  editTemplate, informationTemplate

Definition at line 1397 of file ezcontentobjectattribute.php.

References contentClassAttribute(), informationTemplate(), and viewTemplate().

## Member Data Documentation

## ◆ $AddToBasketIsValid

eZContentObjectAttribute::$AddToBasketIsValid

Definition at line 21 of file ezcontentobjectattribute.php.

Referenced by validateAddToBasket().

## ◆ $AttributeOriginalID

eZContentObjectAttribute::$AttributeOriginalID

Definition at line 1536 of file ezcontentobjectattribute.php.

## ◆ $Content

eZContentObjectAttribute::$Content

Contains the content for this attribute.

Definition at line 1505 of file ezcontentobjectattribute.php.

Referenced by content().

## ◆ $ContentClassAttributeCanTranslate

eZContentObjectAttribute::$ContentClassAttributeCanTranslate

Definition at line 1523 of file ezcontentobjectattribute.php.

Referenced by contentClassAttributeCanTranslate().

## ◆ $ContentClassAttributeID

eZContentObjectAttribute::$ContentClassAttributeID

Definition at line 1513 of file ezcontentobjectattribute.php.

## ◆ $ContentClassAttributeIdentifier

eZContentObjectAttribute::$ContentClassAttributeIdentifier

Definition at line 1522 of file ezcontentobjectattribute.php.

Referenced by contentClassAttributeIdentifier().

## ◆ $ContentClassAttributeIsInformationCollector

eZContentObjectAttribute::$ContentClassAttributeIsInformationCollector

Definition at line 1525 of file ezcontentobjectattribute.php.

Referenced by contentClassAttributeIsInformationCollector().

## ◆ $ContentClassAttributeIsRequired

eZContentObjectAttribute::$ContentClassAttributeIsRequired

Definition at line 1526 of file ezcontentobjectattribute.php.

Referenced by contentClassAttributeIsRequired().

## ◆ $ContentClassAttributeName

eZContentObjectAttribute::$ContentClassAttributeName

Definition at line 1524 of file ezcontentobjectattribute.php.

Referenced by contentClassAttributeName().

## ◆ $DataFloat

eZContentObjectAttribute::$DataFloat

Definition at line 1541 of file ezcontentobjectattribute.php.

## ◆ $DataInt

eZContentObjectAttribute::$DataInt

Definition at line 1540 of file ezcontentobjectattribute.php.

## ◆ $DataText

eZContentObjectAttribute::$DataText

Definition at line 1539 of file ezcontentobjectattribute.php.

## ◆ $DataTypeCustom

eZContentObjectAttribute::$DataTypeCustom

Definition at line 1531 of file ezcontentobjectattribute.php.

## ◆ $DataTypeString

eZContentObjectAttribute::$DataTypeString

Definition at line 1532 of file ezcontentobjectattribute.php.

## ◆ $DisplayInfo

eZContentObjectAttribute::$DisplayInfo

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

Definition at line 1508 of file ezcontentobjectattribute.php.

Referenced by displayInfo().

## ◆ $HasValidationError

eZContentObjectAttribute::$HasValidationError

Definition at line 1530 of file ezcontentobjectattribute.php.

Referenced by hasValidationError().

## ◆ $HTTPValue

eZContentObjectAttribute::$HTTPValue

Contains the value(s) submitted in HTTP form.

Definition at line 1502 of file ezcontentobjectattribute.php.

Referenced by value().

## ◆ $InputParameters

eZContentObjectAttribute::$InputParameters

Definition at line 1529 of file ezcontentobjectattribute.php.

Referenced by inputParameters().

## ◆ $IsValid

eZContentObjectAttribute::$IsValid

Stores the is valid.

Definition at line 1511 of file ezcontentobjectattribute.php.

Referenced by validateInformation(), and validateInput().

## ◆ $LanguageCode

eZContentObjectAttribute::$LanguageCode

Definition at line 1534 of file ezcontentobjectattribute.php.

## ◆ $LanguageID

eZContentObjectAttribute::$LanguageID

Definition at line 1535 of file ezcontentobjectattribute.php.

## ◆ $SortKeyInt

eZContentObjectAttribute::$SortKeyInt

Definition at line 1537 of file ezcontentobjectattribute.php.

## ◆ $SortKeyString

eZContentObjectAttribute::$SortKeyString

Definition at line 1538 of file ezcontentobjectattribute.php.

## ◆ $ValidationError

eZContentObjectAttribute::$ValidationError

Contains the last validation error.

Definition at line 1516 of file ezcontentobjectattribute.php.

Referenced by validationError().

## ◆ $ValidationLog

eZContentObjectAttribute::$ValidationLog

Contains the last validation error.

Definition at line 1519 of file ezcontentobjectattribute.php.

Referenced by validationLog().

## ◆ $ValidationParameters

eZContentObjectAttribute::$ValidationParameters = array()

Definition at line 1528 of file ezcontentobjectattribute.php.

Referenced by validationParameters().

## ◆ $Version

eZContentObjectAttribute::$Version

Definition at line 1533 of file ezcontentobjectattribute.php.

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

- ezcontentobjectattribute.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.