Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

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

A content datatype which handles object relations. More...

Inheritance diagram for eZObjectRelationListType:

## Public Member Functions
| __construct ()
| isRelationType ()
| validateObjectAttributeHTTPInput ( $http, $base, $contentObjectAttribute)
| fixupObjectAttributeHTTPInput ( $http, $base, $contentObjectAttribute)
| fetchObjectAttributeHTTPInput ( $http, $base, $contentObjectAttribute)
| createNewObject ( $contentObjectAttribute, $name)
| onPublish ( $contentObjectAttribute, $contentObject, $publishedNodes)
| initializeObjectAttribute ( $contentObjectAttribute, $currentVersion, $originalContentObjectAttribute)
| validateClassAttributeHTTPInput ( $http, $base, $classAttribute)
| fixupClassAttributeHTTPInput ( $http, $base, $classAttribute)
| fetchClassAttributeHTTPInput ( $http, $base, $classAttribute)
| initializeClassAttribute ( $classAttribute)
| preStoreClassAttribute ( $classAttribute, $version)
| storeClassAttributeContent ( $classAttribute, $content)
| storeObjectAttributeContent ( $objectAttribute, $content)
| deleteStoredObjectAttribute ( $objectAttribute, $version=null)
| deleteNotVersionedStoredClassAttribute (eZContentClassAttribute $classAttribute)
| customObjectAttributeHTTPAction ( $http, $action, $contentObjectAttribute, $parameters)
| handleCustomObjectHTTPActions ( $http, $attributeDataBaseName, $customActionAttributeArray, $customActionParameters)
| createInstance ( $class, $priority, $contentObjectAttribute, $nodePlacement=false)
| appendObject ( $objectID, $priority, $contentObjectAttribute)
| fixRelatedObjectItem ( $contentObjectAttribute, $objectID, $mode)
| fixRelationsMove ( $objectID, $contentObjectAttribute)
| fixRelationsTrash ( $objectID, $contentObjectAttribute)
| fixRelationsRestore ( $objectID, $contentObjectAttribute)
| fixRelationsRemove ( $objectID, $contentObjectAttribute)
| fixRelationsSwap ( $objectID, $contentObjectAttribute)
| objectAttributeContent ( $contentObjectAttribute)
| classAttributeContent ( $classAttribute)
| defaultClassAttributeContent ()
| defaultObjectAttributeContent ()
| createClassContentStructure ( $doc)
| createObjectContentStructure ( $doc)
| customClassAttributeHTTPAction ( $http, $action, $classAttribute)
| metaData ( $contentObjectAttribute)
| toString ( $contentObjectAttribute)
| fromString ( $contentObjectAttribute, $string)
| hasObjectAttributeContent ( $contentObjectAttribute)
| isIndexable ()
| title ( $contentObjectAttribute, $name=null)
| serializeContentClassAttribute ( $classAttribute, $attributeNode, $attributeParametersNode)
| unserializeContentClassAttribute ( $classAttribute, $attributeNode, $attributeParametersNode)
| serializeContentObjectAttribute ( $package, $objectAttribute)
| unserializeContentObjectAttribute ( $package, $objectAttribute, $attributeNode)
| postUnserializeContentObjectAttribute ( $package, $objectAttribute)
| removeRelatedObjectItem ( $contentObjectAttribute, $objectID)
| supportsBatchInitializeObjectAttribute ()
Public Member Functions inherited from eZDataType
| __construct ( $dataTypeString, $name, $properties=array())
| eZDataType ( $dataTypeString, $name, $properties=array())
| viewTemplate ( $contentobjectAttribute)
| editTemplate ( $contentobjectAttribute)
| informationTemplate ( $contentobjectAttribute)
| resultTemplate (&$collectionAttribute)
| isA ()
| isTranslatable ()
| attributes ()
| hasAttribute ( $attr)
| attribute ( $attr)
| isHTTPFileInsertionSupported ()
| isRegularFileInsertionSupported ()
| isSimpleStringInsertionSupported ()
| insertHTTPFile ( $object, $objectVersion, $objectLanguage, $objectAttribute, $httpFile, $mimeData, &$result)
| insertRegularFile ( $object, $objectVersion, $objectLanguage, $objectAttribute, $filePath, &$result)
| insertSimpleString ( $object, $objectVersion, $objectLanguage, $objectAttribute, $string, &$result)
| hasStoredFileInformation ( $object, $objectVersion, $objectLanguage, $objectAttribute)
| handleDownload ( $object, $objectVersion, $objectLanguage, $objectAttribute)
| storedFileInformation ( $object, $objectVersion, $objectLanguage, $objectAttribute)
| productOptionInformation ( $objectAttribute, $optionID, $productItem)
| objectDisplayInformation ( $objectAttribute, $mergeInfo=false)
| classDisplayInformation ( $classAttribute, $mergeInfo=false)
| storeObjectAttribute ( $objectAttribute)
| storeClassAttribute ( $classAttribute, $version)
| storeDefinedClassAttribute ( $classAttribute)
| storeModifiedClassAttribute ( $classAttribute)
| storeVersionedClassAttribute ( $classAttribute, $version)
| preStoreDefinedClassAttribute ( $classAttribute)
| preStoreModifiedClassAttribute ( $classAttribute)
| preStoreVersionedClassAttribute ( $classAttribute, $version)
| fetchActionValue ( $action, $actionName, &$value)
| validateCollectionAttributeHTTPInput ( $http, $base, $objectAttribute)
| fixupCollectionAttributeHTTPInput ( $http, $base, $objectAttribute)
| fetchCollectionAttributeHTTPInput ( $collection, $collectionAttribute, $http, $base, $objectAttribute)
| cloneClassAttribute ( $oldClassAttribute, $newClassAttribute)
| repairContentObjectAttribute ( $contentObjectAttribute)
| postInitializeObjectAttribute ( $objectAttribute, $currentVersion, $originalContentObjectAttribute)
| postStore ( $objectAttribute)
| trashStoredObjectAttribute ( $objectAttribute, $version=null)
| restoreTrashedObjectAttribute ( $objectAttribute)
| deleteStoredClassAttribute ( $classAttribute, $version=null)
| contentActionList ( $classAttribute)
| hasInformationCollection ()
| isAddToBasketValidationRequired ()
| validateAddToBasket ( $objectAttribute, $data, &$errors)
| isClassAttributeRemovable ( $classAttribute)
| classAttributeRemovableInformation ( $classAttribute, $includeAll=true)
| isInformationCollector ()
| sortKey ( $objectAttribute)
| sortKeyType ()
| customSorting ()
| customSortingSQL ( $params)
| templateList ()
| createContentObjectAttributeDOMNode ( $objectAttribute)
| diff ( $old, $new, $options=false)
| getDBAFileName ()
| getDBAFilePath ( $checkExtensions=true)
| getDBAExtensionFilePath ()
| importDBDataFromDBAFile ( $dbaFilePath=false)
| batchInitializeObjectAttributeData ( $classAttribute)

## Static Public Member Functions
static | storeClassDOMDocument ( $doc, $classAttribute)
static | storeObjectDOMDocument ( $doc, $objectAttribute)
static | domString ( $domDocument)
static | createClassDOMDocument ( $content)
static | createObjectDOMDocument ( $content)
static | contentObjectArrayXMLMap ()
static | isItemPublished ( $relationItem)
static | parseXML ( $xmlText)
Static Public Member Functions inherited from eZDataType
static | create ( $dataTypeString)
static | registeredDataTypes ()
static | register ( $dataTypeString, $className)
static | allowedTypes ()
static | loadAndRegisterAllTypes ()
static | loadAndRegisterType ( $type)

## Public Attributes
const | DATA_TYPE_STRING = "ezobjectrelationlist"
Public Attributes inherited from eZDataType
| $Attributes
| $DataTypeString
| The datatype string ID, used for uniquely identifying a datatype. More...
| $Name
| The descriptive name of the datatype, usually used for displaying to the user. More...

## Static Private Member Functions
static | removeRelationObject ( $contentObjectAttribute, $deletionItem)

## Detailed Description

A content datatype which handles object relations.

Bugs/missing/deprecated features:

- No identifier support yet
- Validation and fixup for "Add new object" functionality
- Proper embed views for admin classes
- No translation page support yet (maybe?)
- is_modified is deprecated and is used for BC only.

Definition at line 25 of file ezobjectrelationlisttype.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZObjectRelationListType::__construct | ( |  | ) |

Definition at line 29 of file ezobjectrelationlisttype.php.

References ezpI18n\tr().

## Member Function Documentation

## ◆ appendObject()

eZObjectRelationListType::appendObject | ( |  | $objectID,
|  |  | $priority,
|  |  | $contentObjectAttribute
| ) |  |

Generate array with object relation info

Parameters

  integer | $objectID | The id of the object to add as relation
  integer | $priority | The priortity of the relation
  eZContentObjectAttribute | $contentObjectAttribute | Not used

Returns
  array|null A array containing relation information or null if object does not exist

Definition at line 1313 of file ezobjectrelationlisttype.php.

References eZContentObject\fetch().

Referenced by customObjectAttributeHTTPAction(), fetchObjectAttributeHTTPInput(), fixRelationsRestore(), fixRelationsSwap(), and fromString().

## ◆ classAttributeContent()

eZObjectRelationListType::classAttributeContent | ( |  | $classAttribute | ) |

Returns the content data for the given content class attribute.

Reimplemented from eZDataType.

Definition at line 1458 of file ezobjectrelationlisttype.php.

References createClassContentStructure(), defaultClassAttributeContent(), and parseXML().

## ◆ contentObjectArrayXMLMap()

static eZObjectRelationListType::contentObjectArrayXMLMap | ( |  | ) |
| static

Returns xml identifier to attribute map

Key is xml identifier as used in attribute data_string format, and value is the name exposed in attribute.

Warning: Besides contentobject_id most attributes are not updated on changes and hence represent the values when the relation was first created. These should ideally have been prefixed with "original" (see inline). You can see this in affect all over this datatype that for instance version number from attribute source is newer used for basis to generate things like title, metadata or toString value.

Returns
  array

Definition at line 861 of file ezobjectrelationlisttype.php.

Referenced by createObjectContentStructure(), and createObjectDOMDocument().

## ◆ createClassContentStructure()

eZObjectRelationListType::createClassContentStructure | ( |  | $doc | ) |

Definition at line 1490 of file ezobjectrelationlisttype.php.

References defaultClassAttributeContent().

Referenced by classAttributeContent().

## ◆ createClassDOMDocument()

static eZObjectRelationListType::createClassDOMDocument | ( |  | $content | ) |
| static

Definition at line 788 of file ezobjectrelationlisttype.php.

Referenced by storeClassAttributeContent().

## ◆ createInstance()

eZObjectRelationListType::createInstance | ( |  | $class,
|  |  | $priority,
|  |  | $contentObjectAttribute,
|  |  | $nodePlacement = `false`
| ) |  |

Definition at line 1282 of file ezobjectrelationlisttype.php.

Referenced by customObjectAttributeHTTPAction().

## ◆ createNewObject()

eZObjectRelationListType::createNewObject | ( |  | $contentObjectAttribute,
|  |  | $name
| ) |  |

Definition at line 333 of file ezobjectrelationlisttype.php.

References eZOperationHandler\execute(), eZContentClass\fetch(), eZContentObjectTreeNode\fetch(), and eZDebug\writeError().

## ◆ createObjectContentStructure()

eZObjectRelationListType::createObjectContentStructure | ( |  | $doc | ) |

Definition at line 1531 of file ezobjectrelationlisttype.php.

References contentObjectArrayXMLMap(), and defaultObjectAttributeContent().

Referenced by objectAttributeContent().

## ◆ createObjectDOMDocument()

static eZObjectRelationListType::createObjectDOMDocument | ( |  | $content | ) |
| static

Definition at line 821 of file ezobjectrelationlisttype.php.

References contentObjectArrayXMLMap().

Referenced by serializeContentObjectAttribute(), and storeObjectAttributeContent().

## ◆ customClassAttributeHTTPAction()

eZObjectRelationListType::customClassAttributeHTTPAction | ( |  | $http,
|  |  | $action,
|  |  | $classAttribute
| ) |  |

Executes a custom action for a class attribute which was defined on the web page.

Note
  Default implementation does nothing.

Reimplemented from eZDataType.

Definition at line 1555 of file ezobjectrelationlisttype.php.

References eZContentBrowse\browse(), eZContentBrowse\result(), and eZDebug\writeError().

## ◆ customObjectAttributeHTTPAction()

eZObjectRelationListType::customObjectAttributeHTTPAction | ( |  | $http,
|  |  | $action,
|  |  | $objectAttribute,
|  |  | $parameters
| ) |  |

Executes a custom action for an object attribute which was defined on the web page.

Note
  Default implementation does nothing.

Reimplemented from eZDataType.

Definition at line 900 of file ezobjectrelationlisttype.php.

References appendObject(), eZContentBrowse\browse(), createInstance(), eZContentObject\fetch(), eZContentClass\fetch(), eZDataType\fetchActionValue(), eZHTTPTool\instance(), eZContentBrowse\nodeAliasID(), removeRelationObject(), and eZDebug\writeError().

## ◆ defaultClassAttributeContent()

eZObjectRelationListType::defaultClassAttributeContent | ( |  | ) |

Definition at line 1476 of file ezobjectrelationlisttype.php.

Referenced by classAttributeContent(), createClassContentStructure(), initializeClassAttribute(), and initializeObjectAttribute().

## ◆ defaultObjectAttributeContent()

eZObjectRelationListType::defaultObjectAttributeContent | ( |  | ) |

Definition at line 1485 of file ezobjectrelationlisttype.php.

Referenced by createObjectContentStructure(), fromString(), and objectAttributeContent().

## ◆ deleteNotVersionedStoredClassAttribute()

eZObjectRelationListType::deleteNotVersionedStoredClassAttribute | ( | eZContentClassAttribute | $classAttribute | ) |

Clean up stored class attribute for content class that is not versioned. Note: Default implementation does nothing

Parameters

  eZContentClassAttribute | $classAttribute |

Reimplemented from eZDataType.

Definition at line 895 of file ezobjectrelationlisttype.php.

References eZPersistentObject\attribute(), and eZContentObjectAttribute\removeRelationsByContentClassAttributeId().

## ◆ deleteStoredObjectAttribute()

eZObjectRelationListType::deleteStoredObjectAttribute | ( |  | $objectAttribute,
|  |  | $version = `null`
| ) |  |

Deletes $objectAttribute datatype data, optionally in version $version.

Parameters

  eZContentObjectAttribute | $objectAttribute |
  int | $version |

Reimplemented from eZDataType.

Definition at line 879 of file ezobjectrelationlisttype.php.

References eZDB\instance(), and removeRelationObject().

## ◆ domString()

static eZObjectRelationListType::domString | ( |  | $domDocument | ) |
| static

Returns
  the XML structure in $domDocument as text. It will take of care of the necessary charset conversions for content storage.

Definition at line 768 of file ezobjectrelationlisttype.php.

References eZTextCodec\internalCharset(), and eZCharsetInfo\realCharsetCode().

Referenced by eZContentObjectTreeNodeOperations\copySubtree(), storeClassDOMDocument(), and storeObjectDOMDocument().

## ◆ fetchClassAttributeHTTPInput()

eZObjectRelationListType::fetchClassAttributeHTTPInput | ( |  | $http,
|  |  | $base,
|  |  | $classAttribute
| ) |  |

Fetches the HTTP input for the content class attribute.

Note
  Default implementation does nothing.

Reimplemented from eZDataType.

Definition at line 674 of file ezobjectrelationlisttype.php.

## ◆ fetchObjectAttributeHTTPInput()

eZObjectRelationListType::fetchObjectAttributeHTTPInput | ( |  | $http,
|  |  | $base,
|  |  | $contentObjectAttribute
| ) |  |

Fetches the http post var string input and stores it in the data instance.

Reimplemented from eZDataType.

Definition at line 190 of file ezobjectrelationlisttype.php.

References appendObject(), and eZDebug\writeError().

## ◆ fixRelatedObjectItem()

eZObjectRelationListType::fixRelatedObjectItem | ( |  | $contentObjectAttribute,
|  |  | $objectID,
|  |  | $mode
| ) |  |

Fixes objects with given ID in the relations list according to what is done with object

Note
  Default implementation does nothing.

Reimplemented from eZDataType.

Definition at line 1340 of file ezobjectrelationlisttype.php.

References fixRelationsMove(), fixRelationsRemove(), fixRelationsRestore(), fixRelationsSwap(), fixRelationsTrash(), and eZDebug\writeWarning().

## ◆ fixRelationsMove()

eZObjectRelationListType::fixRelationsMove | ( |  | $objectID,
|  |  | $contentObjectAttribute
| ) |  |

Definition at line 1376 of file ezobjectrelationlisttype.php.

References fixRelationsSwap().

Referenced by fixRelatedObjectItem().

## ◆ fixRelationsRemove()

eZObjectRelationListType::fixRelationsRemove | ( |  | $objectID,
|  |  | $contentObjectAttribute
| ) |  |

Definition at line 1415 of file ezobjectrelationlisttype.php.

References removeRelatedObjectItem().

Referenced by fixRelatedObjectItem().

## ◆ fixRelationsRestore()

eZObjectRelationListType::fixRelationsRestore | ( |  | $objectID,
|  |  | $contentObjectAttribute
| ) |  |

Definition at line 1398 of file ezobjectrelationlisttype.php.

References appendObject(), and storeObjectAttributeContent().

Referenced by fixRelatedObjectItem().

## ◆ fixRelationsSwap()

eZObjectRelationListType::fixRelationsSwap | ( |  | $objectID,
|  |  | $contentObjectAttribute
| ) |  |

Definition at line 1421 of file ezobjectrelationlisttype.php.

References appendObject(), and storeObjectAttributeContent().

Referenced by fixRelatedObjectItem(), and fixRelationsMove().

## ◆ fixRelationsTrash()

eZObjectRelationListType::fixRelationsTrash | ( |  | $objectID,
|  |  | $contentObjectAttribute
| ) |  |

Definition at line 1381 of file ezobjectrelationlisttype.php.

References storeObjectAttributeContent().

Referenced by fixRelatedObjectItem().

## ◆ fixupClassAttributeHTTPInput()

eZObjectRelationListType::fixupClassAttributeHTTPInput | ( |  | $http,
|  |  | $base,
|  |  | $classAttribute
| ) |  |

Tries to do a fixup on the input text so that it's acceptable as class attribute input.

Note
  Default implementation does nothing and returns accepted.

Reimplemented from eZDataType.

Definition at line 670 of file ezobjectrelationlisttype.php.

## ◆ fixupObjectAttributeHTTPInput()

eZObjectRelationListType::fixupObjectAttributeHTTPInput | ( |  | $http,
|  |  | $base,
|  |  | $contentObjectAttribute
| ) |  |

Validates the input and returns true if the input was valid for this datatype.

Reimplemented from eZDataType.

Definition at line 165 of file ezobjectrelationlisttype.php.

## ◆ fromString()

eZObjectRelationListType::fromString | ( |  | $contentObjectAttribute,
|  |  | $string
| ) |  |

Reimplemented from eZDataType.

Definition at line 1655 of file ezobjectrelationlisttype.php.

References appendObject(), defaultObjectAttributeContent(), eZContentObject\fetch(), and eZDebug\writeWarning().

## ◆ handleCustomObjectHTTPActions()

eZObjectRelationListType::handleCustomObjectHTTPActions | ( |  | $http,
|  |  | $attributeDataBaseName,
|  |  | $customActionAttributeArray,
|  |  | $customActionParameters
| ) |  |

Takes care of custom action handling, this means checking if a custom action request must be sent to a contentobject attribute. This function is only useful for datatypes that must do custom action handling for sub objects and attributes.

Note
  Default implementation does nothing.

Reimplemented from eZDataType.

Definition at line 1162 of file ezobjectrelationlisttype.php.

References eZContentObject\fetch(), and eZContentObject\recursionProtect().

## ◆ hasObjectAttributeContent()

eZObjectRelationListType::hasObjectAttributeContent | ( |  | $contentObjectAttribute | ) |

Returns
  `true` if the datatype finds any content in the attribute $contentObjectAttribute.

Reimplemented from eZDataType.

Definition at line 1678 of file ezobjectrelationlisttype.php.

## ◆ initializeClassAttribute()

eZObjectRelationListType::initializeClassAttribute | ( |  | $classAttribute | ) |

Initializes the class attribute with some data.

Note
  Default implementation does nothing.

Reimplemented from eZDataType.

Definition at line 712 of file ezobjectrelationlisttype.php.

References defaultClassAttributeContent(), and storeClassAttributeContent().

## ◆ initializeObjectAttribute()

eZObjectRelationListType::initializeObjectAttribute | ( |  | $objectAttribute,
|  |  | $currentVersion,
|  |  | $originalContentObjectAttribute
| ) |  |

Initializes the object attribute with some data.

Parameters

  eZContentObjectAttribute | $objectAttribute |
  int | $currentVersion |
  eZContentObjectAttribute | $originalContentObjectAttribute |

Reimplemented from eZDataType.

Definition at line 576 of file ezobjectrelationlisttype.php.

References defaultClassAttributeContent(), eZContentObject\fetch(), eZContentObjectTreeNode\fetch(), and eZContentObject\STATUS_ARCHIVED.

## ◆ isIndexable()

eZObjectRelationListType::isIndexable | ( |  | ) |

Returns
  true if the datatype can be indexed

Reimplemented from eZDataType.

Definition at line 1684 of file ezobjectrelationlisttype.php.

## ◆ isItemPublished()

static eZObjectRelationListType::isItemPublished | ( |  | $relationItem | ) |
| static

Returns
  `true` if the relation item $relationItem exist in the content tree.

Definition at line 1195 of file ezobjectrelationlisttype.php.

## ◆ isRelationType()

eZObjectRelationListType::isRelationType | ( |  | ) |

Indicates if the datatype handles relations

Returns
  bool

Reimplemented from eZDataType.

Definition at line 35 of file ezobjectrelationlisttype.php.

## ◆ metaData()

eZObjectRelationListType::metaData | ( |  | $contentObjectAttribute | ) |

Returns the meta data used for storing search indexes.

Reimplemented from eZDataType.

Definition at line 1601 of file ezobjectrelationlisttype.php.

References eZContentObject\fetch(), and eZContentObjectAttribute\metaDataArray().

## ◆ objectAttributeContent()

eZObjectRelationListType::objectAttributeContent | ( |  | $contentObjectAttribute | ) |

Returns the content.

Reimplemented from eZDataType.

Definition at line 1444 of file ezobjectrelationlisttype.php.

References createObjectContentStructure(), defaultObjectAttributeContent(), and parseXML().

Referenced by title().

## ◆ onPublish()

eZObjectRelationListType::onPublish | ( |  | $contentObjectAttribute,
|  |  | $contentObject,
|  |  | $publishedNodes
| ) |  |

Performs necessary actions with attribute data after object is published, it means that you have access to published nodes.

Returns
  True if the value was stored correctly.

Note
  The method is entirely up to the datatype, for instance it could reuse the available types in the the attribute or store in a separate object.
  Might be transaction unsafe.

Reimplemented from eZDataType.

Definition at line 500 of file ezobjectrelationlisttype.php.

References eZNodeAssignment\create(), eZOperationHandler\execute(), eZNodeAssignment\fetch(), eZContentObject\fetch(), eZContentObjectVersion\fetchVersion(), eZContentObjectTreeNode\SORT_FIELD_PUBLISHED, eZContentObjectTreeNode\SORT_ORDER_DESC, eZContentObjectVersion\STATUS_ARCHIVED, eZContentObject\STATUS_PUBLISHED, eZContentObjectVersion\STATUS_PUBLISHED, and storeObjectAttributeContent().

## ◆ parseXML()

static eZObjectRelationListType::parseXML | ( |  | $xmlText | ) |
| static

Definition at line 1469 of file ezobjectrelationlisttype.php.

Referenced by classAttributeContent(), eZContentObjectTreeNodeOperations\copySubtree(), objectAttributeContent(), postUnserializeContentObjectAttribute(), and removeRelatedObjectItem().

## ◆ postUnserializeContentObjectAttribute()

eZObjectRelationListType::postUnserializeContentObjectAttribute | ( |  | $package,
|  |  | $objectAttribute
| ) |  |

Reimplemented from eZDataType.

Definition at line 1865 of file ezobjectrelationlisttype.php.

References eZContentObject\fetchByRemoteID(), parseXML(), and eZDebug\writeWarning().

## ◆ preStoreClassAttribute()

eZObjectRelationListType::preStoreClassAttribute | ( |  | $classAttribute,
|  |  | $version
| ) |  |

Similar to the storeClassAttribute but is called before the attribute itself is stored and can be used to set values in the class attribute.

Returns
  True if the value was stored correctly.

See also
  fetchClassAttributeHTTPInput

Reimplemented from eZDataType.

Definition at line 722 of file ezobjectrelationlisttype.php.

References storeClassAttributeContent().

## ◆ removeRelatedObjectItem()

eZObjectRelationListType::removeRelatedObjectItem | ( |  | $contentObjectAttribute,
|  |  | $objectID
| ) |  |

Removes objects with given ID from the relations list

Reimplemented from eZDataType.

Definition at line 1906 of file ezobjectrelationlisttype.php.

References parseXML(), and storeObjectDOMDocument().

Referenced by fixRelationsRemove().

## ◆ removeRelationObject()

static eZObjectRelationListType::removeRelationObject | ( |  | $contentObjectAttribute,
|  |  | $deletionItem
| ) |  |
| static private

Removes the relation object $deletionItem if the item is owned solely by this version and is not published in the content tree.

Definition at line 1205 of file ezobjectrelationlisttype.php.

References eZPersistentObject\count(), eZContentObjectAttribute\definition(), eZContentObjectTrashNode\definition(), eZPersistentObject\fetchObjectList(), eZContentObjectVersion\fetchVersion(), and eZDebug\writeError().

Referenced by customObjectAttributeHTTPAction(), and deleteStoredObjectAttribute().

## ◆ serializeContentClassAttribute()

eZObjectRelationListType::serializeContentClassAttribute | ( |  | $classAttribute,
|  |  | $attributeNode,
|  |  | $attributeParametersNode
| ) |  |

Adds the necessary dom structure to the attribute parameters.

Note
  The default is to add unsupported='true' to the attribute node, meaning that the datatype does not support serializing.

Reimplemented from eZDataType.

Definition at line 1711 of file ezobjectrelationlisttype.php.

## ◆ serializeContentObjectAttribute()

eZObjectRelationListType::serializeContentObjectAttribute | ( |  | $package,
|  |  | $objectAttribute
| ) |  |

For each relation export its priority and content object remote_id, like this: <related-objects> <relation-list> <relation-item priority="1" contentobject-remote-id="faaeb9be3bd98ed09f606fc16d144eca" /> <relation-item priority="2" contentobject-remote-id="1bb4fe25487f05527efa8bfd394cecc7" /> </relation-list> To do this we fetch content XML and strip all the relation attributes except of "priority" from there, and add "contentobject-remote-id" attribute.

Reimplemented from eZDataType.

Definition at line 1800 of file ezobjectrelationlisttype.php.

References eZDataType\createContentObjectAttributeDOMNode(), createObjectDOMDocument(), eZContentObject\fetch(), eZDebug\writeDebug(), and eZDebug\writeError().

## ◆ storeClassAttributeContent()

eZObjectRelationListType::storeClassAttributeContent | ( |  | $classAttribute,
|  |  | $content
| ) |  |

Definition at line 728 of file ezobjectrelationlisttype.php.

References createClassDOMDocument(), and storeClassDOMDocument().

Referenced by initializeClassAttribute(), preStoreClassAttribute(), and unserializeContentClassAttribute().

## ◆ storeClassDOMDocument()

static eZObjectRelationListType::storeClassDOMDocument | ( |  | $doc,
|  |  | $classAttribute
| ) |  |
| static

Definition at line 750 of file ezobjectrelationlisttype.php.

References domString().

Referenced by storeClassAttributeContent().

## ◆ storeObjectAttributeContent()

eZObjectRelationListType::storeObjectAttributeContent | ( |  | $objectAttribute,
|  |  | $content
| ) |  |

Definition at line 739 of file ezobjectrelationlisttype.php.

References createObjectDOMDocument(), and storeObjectDOMDocument().

Referenced by fixRelationsRestore(), fixRelationsSwap(), fixRelationsTrash(), and onPublish().

## ◆ storeObjectDOMDocument()

static eZObjectRelationListType::storeObjectDOMDocument | ( |  | $doc,
|  |  | $objectAttribute
| ) |  |
| static

Definition at line 756 of file ezobjectrelationlisttype.php.

References domString().

Referenced by removeRelatedObjectItem(), and storeObjectAttributeContent().

## ◆ supportsBatchInitializeObjectAttribute()

eZObjectRelationListType::supportsBatchInitializeObjectAttribute | ( |  | ) |

Reimplemented from eZDataType.

Definition at line 1935 of file ezobjectrelationlisttype.php.

## ◆ title()

eZObjectRelationListType::title | ( |  | $contentObjectAttribute,
|  |  | $name = `null`
| ) |  |

Returns the content of the string for use as a title, for simplicity this is the name of the first object referenced or false.

Reimplemented from eZDataType.

Definition at line 1693 of file ezobjectrelationlisttype.php.

References eZContentObject\fetch(), and objectAttributeContent().

## ◆ toString()

eZObjectRelationListType::toString | ( |  | $contentObjectAttribute | ) |

Returns
  string representation of an contentobjectattribute data for simplified export

Reimplemented from eZDataType.

Definition at line 1644 of file ezobjectrelationlisttype.php.

## ◆ unserializeContentClassAttribute()

eZObjectRelationListType::unserializeContentClassAttribute | ( |  | $classAttribute,
|  |  | $attributeNode,
|  |  | $attributeParametersNode
| ) |  |

Extracts values from the attribute parameters and sets it in the class attribute.

Note
  This function is called after the attribute has been stored and a second store is called after this function is done.

Reimplemented from eZDataType.

Definition at line 1752 of file ezobjectrelationlisttype.php.

References storeClassAttributeContent().

## ◆ unserializeContentObjectAttribute()

eZObjectRelationListType::unserializeContentObjectAttribute | ( |  | $package,
|  |  | $objectAttribute,
|  |  | $attributeNode
| ) |  |

Unserialize contentobject attribute

Parameters

  package |
  objectAttribute | contentobject attribute object
  attributeNode | ezdomnode object

Reimplemented from eZDataType.

Definition at line 1858 of file ezobjectrelationlisttype.php.

## ◆ validateClassAttributeHTTPInput()

eZObjectRelationListType::validateClassAttributeHTTPInput | ( |  | $http,
|  |  | $base,
|  |  | $classAttribute
| ) |  |

Validates the input for a class attribute and returns a validation state as defined in eZInputValidator.

Note
  Default implementation does nothing and returns accepted.

Reimplemented from eZDataType.

Definition at line 665 of file ezobjectrelationlisttype.php.

References eZInputValidator\STATE_ACCEPTED.

## ◆ validateObjectAttributeHTTPInput()

eZObjectRelationListType::validateObjectAttributeHTTPInput | ( |  | $http,
|  |  | $base,
|  |  | $contentObjectAttribute
| ) |  |

Validates the input and returns true if the input was valid for this datatype.

Reimplemented from eZDataType.

Definition at line 44 of file ezobjectrelationlisttype.php.

References eZContentObject\fetch(), eZInputValidator\STATE_ACCEPTED, eZInputValidator\STATE_INTERMEDIATE, eZInputValidator\STATE_INVALID, and ezpI18n\tr().

## Member Data Documentation

## ◆ DATA_TYPE_STRING

const eZObjectRelationListType::DATA_TYPE_STRING = "ezobjectrelationlist"

Definition at line 27 of file ezobjectrelationlisttype.php.

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

- ezobjectrelationlisttype.php

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