Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

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

Base class for content datatypes. More...

Inheritance diagram for eZDataType:

## Public Member Functions
| __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 ()
| isRelationType ()
| 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)
| objectAttributeContent ( $objectAttribute)
| hasObjectAttributeContent ( $contentObjectAttribute)
| classAttributeContent ( $classAttribute)
| storeObjectAttribute ( $objectAttribute)
| onPublish ( $contentObjectAttribute, $contentObject, $publishedNodes)
| preStoreClassAttribute ( $classAttribute, $version)
| storeClassAttribute ( $classAttribute, $version)
| storeDefinedClassAttribute ( $classAttribute)
| storeModifiedClassAttribute ( $classAttribute)
| storeVersionedClassAttribute ( $classAttribute, $version)
| preStoreDefinedClassAttribute ( $classAttribute)
| preStoreModifiedClassAttribute ( $classAttribute)
| preStoreVersionedClassAttribute ( $classAttribute, $version)
| validateClassAttributeHTTPInput ( $http, $base, $classAttribute)
| fixupClassAttributeHTTPInput ( $http, $base, $classAttribute)
| fetchClassAttributeHTTPInput ( $http, $base, $classAttribute)
| customClassAttributeHTTPAction ( $http, $action, $classAttribute)
| fetchActionValue ( $action, $actionName, &$value)
| validateObjectAttributeHTTPInput ( $http, $base, $objectAttribute)
| fixupObjectAttributeHTTPInput ( $http, $base, $objectAttribute)
| fetchObjectAttributeHTTPInput ( $http, $base, $objectAttribute)
| validateCollectionAttributeHTTPInput ( $http, $base, $objectAttribute)
| fixupCollectionAttributeHTTPInput ( $http, $base, $objectAttribute)
| fetchCollectionAttributeHTTPInput ( $collection, $collectionAttribute, $http, $base, $objectAttribute)
| customObjectAttributeHTTPAction ( $http, $action, $objectAttribute, $parameters)
| handleCustomObjectHTTPActions ( $http, $attributeDataBaseName, $customActionAttributeArray, $customActionParameters)
| initializeClassAttribute ( $classAttribute)
| cloneClassAttribute ( $oldClassAttribute, $newClassAttribute)
| initializeObjectAttribute ( $objectAttribute, $currentVersion, $originalContentObjectAttribute)
| repairContentObjectAttribute ( $contentObjectAttribute)
| postInitializeObjectAttribute ( $objectAttribute, $currentVersion, $originalContentObjectAttribute)
| postStore ( $objectAttribute)
| trashStoredObjectAttribute ( $objectAttribute, $version=null)
| restoreTrashedObjectAttribute ( $objectAttribute)
| deleteStoredObjectAttribute ( $objectAttribute, $version=null)
| deleteStoredClassAttribute ( $classAttribute, $version=null)
| deleteNotVersionedStoredClassAttribute (eZContentClassAttribute $classAttribute)
| contentActionList ( $classAttribute)
| hasInformationCollection ()
| title ( $objectAttribute, $name=null)
| isIndexable ()
| isAddToBasketValidationRequired ()
| validateAddToBasket ( $objectAttribute, $data, &$errors)
| isClassAttributeRemovable ( $classAttribute)
| classAttributeRemovableInformation ( $classAttribute, $includeAll=true)
| isInformationCollector ()
| sortKey ( $objectAttribute)
| sortKeyType ()
| customSorting ()
| customSortingSQL ( $params)
| metaData ( $contentObjectAttribute)
| toString ( $objectAttribute)
| fromString ( $objectAttribute, $string)
| templateList ()
| serializeContentClassAttribute ( $classAttribute, $attributeNode, $attributeParametersNode)
| unserializeContentClassAttribute ( $classAttribute, $attributeNode, $attributeParametersNode)
| serializeContentObjectAttribute ( $package, $objectAttribute)
| unserializeContentObjectAttribute ( $package, $objectAttribute, $attributeNode)
| postUnserializeContentObjectAttribute ( $package, $objectAttribute)
| removeRelatedObjectItem ( $contentObjectAttribute, $objectID)
| fixRelatedObjectItem ( $contentObjectAttribute, $objectID, $mode)
| createContentObjectAttributeDOMNode ( $objectAttribute)
| diff ( $old, $new, $options=false)
| getDBAFileName ()
| getDBAFilePath ( $checkExtensions=true)
| getDBAExtensionFilePath ()
| importDBDataFromDBAFile ( $dbaFilePath=false)
| batchInitializeObjectAttributeData ( $classAttribute)
| supportsBatchInitializeObjectAttribute ()

## Static Public Member Functions
static | create ( $dataTypeString)
static | registeredDataTypes ()
static | register ( $dataTypeString, $className)
static | allowedTypes ()
static | loadAndRegisterAllTypes ()
static | loadAndRegisterType ( $type)

## Public Attributes
| $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...

## Private Member Functions
| cleanDBDataBeforeImport ()

## Detailed Description

Base class for content datatypes.

Defines both the interface for datatypes as well as functions for registering, quering and fetching datatypes.

Each new datatype will inherit this class and define some functions as well as three templates. A datatype has three roles, it handles definition of content class attributes, editing of a content object attribute and viewing of a content object attribute. The content class attribute definition part is optional while object attribute edit and view must be implemented for the datatype to be usable.

If the datatype handles class attribute definition it must define one or more of these functions: storeClassAttribute, validateClassAttributeHTTPInput, fixupClassAttributeHTTPInput, fetchClassAttributeHTTPInput. See each function for more details. The class attribute definition usually defines the default data and/or the validation rules for an object attribute.

Object attribute editing must define these functions: storeObjectAttribute, validateObjectAttributeHTTPInput, fixupObjectAttributeHTTPInput, fetchObjectAttributeHTTPInput, initializeObjectAttribute. If the attribute wants to have a custom action it must implement the customObjectAttributeHTTPAction function. See each function for more details.

Each datatype initializes itself with a datatype string id (ezstring, ezinteger) and a descriptive name. The datatype string id must be unique for the whole system and should have a prefix, for instance we in eZ Systems use ez as our prefix.

Definition at line 45 of file ezdatatype.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZDataType::__construct | ( |  | $dataTypeString,
|  |  | $name,
|  |  | $properties = `array()`
| ) |  |

Initializes the datatype with the string id $dataTypeString and the name $name.

Parameters

  string | $dataTypeString |
  string | $name |
  array | $properties |

Definition at line 55 of file ezdatatype.php.

References isIndexable(), and isInformationCollector().

Referenced by eZDataType().

## Member Function Documentation

## ◆ allowedTypes()

static eZDataType::allowedTypes | ( |  | ) |
| static

Definition at line 1276 of file ezdatatype.php.

Referenced by loadAndRegisterAllTypes().

## ◆ attribute()

eZDataType::attribute | ( |  | $attr | ) |

Returns
  the data for the attribute $attr or null if it does not exist.

Definition at line 248 of file ezdatatype.php.

References eZDebug\writeError().

## ◆ attributes()

eZDataType::attributes | ( |  | ) |

Returns
  the attributes for this datatype.

Definition at line 232 of file ezdatatype.php.

## ◆ batchInitializeObjectAttributeData()

eZDataType::batchInitializeObjectAttributeData | ( |  | $classAttribute | ) |

Reimplemented in eZXMLTextType, eZTimeType, eZStringType, eZRangeOptionType, eZProductCategoryType, eZOptionType, eZMultiOption2Type, eZMatrixType, eZIntegerType, eZFloatType, eZDateTimeType, eZDateType, and eZBooleanType.

Definition at line 1503 of file ezdatatype.php.

## ◆ classAttributeContent()

eZDataType::classAttributeContent | ( |  | $classAttribute | ) |

Returns the content data for the given content class attribute.

Reimplemented in eZMatrixType, eZEnumType, eZObjectRelationType, eZSelectionType, eZPriceType, eZObjectRelationListType, eZMultiPriceType, eZISBNType, eZDateTimeType, and eZCountryType.

Definition at line 618 of file ezdatatype.php.

## ◆ classAttributeRemovableInformation()

eZDataType::classAttributeRemovableInformation | ( |  | $classAttribute,
|  |  | $includeAll = `true`
| ) |  |

If the call to isClassAttributeRemovable() returns `false` then this can be called to figure out why it cannot be removed, e.g to give information to the user.

Returns
  An array structure with information, or `false` if no info is available
  - text - Plain text explaining why it can't be removed
  - list - A list of reasons with details on why it can be removed
    - identifier - The identifier of the reason (optional)
    - text - Plain text explaning the reason

Parameters

  $includeAll | Controls whether the returned information will contain all sources for not being to remove or just the first that it finds.

Reimplemented in eZUserType.

Definition at line 1078 of file ezdatatype.php.

Referenced by isClassAttributeRemovable().

## ◆ classDisplayInformation()

eZDataType::classDisplayInformation | ( |  | $classAttribute,
|  |  | $mergeInfo = `false`
| ) |  |

\virtual Will return information on how the datatype should be represented in the various display modes when used by a class.

If this method is reimplemented the implementor must call this method with the new info array as second parameter.

Parameters

  $classAttribute | The content class attribute to return info for.
  $mergeInfo | A structure that must match the returned array, or `false` to ignore. Any entries here will override the default.

Returns
  An array structure which contains:
  - `edit`
    - `grouped_input` - If `true` then the datatype has lots of input elements that should be grouped. (e.g. in a fieldset) ClassEditSettings/GroupedInput in datatype.ini is used to automatically determine this field and will override the default and datatype setting if used.

- `view`

Definition at line 563 of file ezdatatype.php.

## ◆ cleanDBDataBeforeImport()

eZDataType::cleanDBDataBeforeImport | ( |  | ) |
| private

Used by updateDBDataByDBAFile() method Must return true if successfull, or false otherwise.

Reimplemented in eZISBNType.

Definition at line 1498 of file ezdatatype.php.

Referenced by importDBDataFromDBAFile().

## ◆ cloneClassAttribute()

eZDataType::cloneClassAttribute | ( |  | $oldClassAttribute,
|  |  | $newClassAttribute
| ) |  |

Clones the date from the old class attribute to the new one.

Note
  Default implementation does nothing which is good enough for datatypes which does not use external tables.

Reimplemented in eZEnumType.

Definition at line 895 of file ezdatatype.php.

## ◆ contentActionList()

eZDataType::contentActionList | ( |  | $classAttribute | ) |

Return content action(s) which can be performed on object containing the current datatype. Return format is array of arrays with key 'name' and 'action'. 'action' can be mapped to url in datatype.ini

Parameters

  eZContentClassAttribute | $classAttribute |

Returns
  array

Reimplemented in eZPriceType, and eZMultiPriceType.

Definition at line 986 of file ezdatatype.php.

References ezpI18n\tr(), and eZDebug\writeError().

## ◆ create()

static eZDataType::create | ( |  | $dataTypeString | ) |
| static

Crates a datatype instance of the datatype string id $dataTypeString.

Note
  It only creates one instance for each datatype.

Definition at line 151 of file ezdatatype.php.

References loadAndRegisterType().

Referenced by eZContentClassAttribute\cachedInfo(), eZContentObjectTreeNode\createSortingSQLStrings(), eZContentClassAttribute\dataType(), eZContentObjectAttribute\dataType(), and eZContentObjectPackageHandler\generateOverrideSettingsArray().

## ◆ createContentObjectAttributeDOMNode()

eZDataType::createContentObjectAttributeDOMNode | ( |  | $objectAttribute | ) |

Create empty content object attribute DOM node.

The result is intended to be used in a datatype's serializeContentObjectAttribute() method.

Returns
  "Empty" DOM node

Definition at line 1371 of file ezdatatype.php.

References isA().

Referenced by eZEnumType\serializeContentObjectAttribute(), eZAuthorType\serializeContentObjectAttribute(), eZBinaryFileType\serializeContentObjectAttribute(), eZDateType\serializeContentObjectAttribute(), eZDateTimeType\serializeContentObjectAttribute(), eZImageType\serializeContentObjectAttribute(), eZIniSettingType\serializeContentObjectAttribute(), eZKeywordType\serializeContentObjectAttribute(), eZMatrixType\serializeContentObjectAttribute(), eZMediaType\serializeContentObjectAttribute(), eZMultiOptionType\serializeContentObjectAttribute(), eZMultiOption2Type\serializeContentObjectAttribute(), eZMultiPriceType\serializeContentObjectAttribute(), eZObjectRelationType\serializeContentObjectAttribute(), eZObjectRelationListType\serializeContentObjectAttribute(), eZOptionType\serializeContentObjectAttribute(), eZRangeOptionType\serializeContentObjectAttribute(), eZSubtreeSubscriptionType\serializeContentObjectAttribute(), eZTimeType\serializeContentObjectAttribute(), eZURLType\serializeContentObjectAttribute(), eZUserType\serializeContentObjectAttribute(), and eZXMLTextType\serializeContentObjectAttribute().

## ◆ customClassAttributeHTTPAction()

eZDataType::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 in eZMatrixType, eZIdentifierType, eZEnumType, eZObjectRelationListType, eZObjectRelationType, and eZISBNType.

Definition at line 787 of file ezdatatype.php.

## ◆ customObjectAttributeHTTPAction()

eZDataType::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 in eZXMLTextType, eZOptionType, eZObjectRelationListType, eZObjectRelationType, eZMultiPriceType, eZMultiOption2Type, eZMultiOptionType, eZMediaType, eZMatrixType, eZImageType, eZBinaryFileType, and eZAuthorType.

Definition at line 868 of file ezdatatype.php.

## ◆ customSorting()

eZDataType::customSorting | ( |  | ) |

Reimplemented in eZMultiPriceType.

Definition at line 1108 of file ezdatatype.php.

## ◆ customSortingSQL()

eZDataType::customSortingSQL | ( |  | $params | ) |

Reimplemented in eZMultiPriceType.

Definition at line 1113 of file ezdatatype.php.

## ◆ deleteNotVersionedStoredClassAttribute()

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

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

Parameters

  eZContentClassAttribute | $classAttribute |

Reimplemented in eZObjectRelationListType, and eZObjectRelationType.

Definition at line 974 of file ezdatatype.php.

## ◆ deleteStoredClassAttribute()

eZDataType::deleteStoredClassAttribute | ( |  | $classAttribute,
|  |  | $version = `null`
| ) |  |

Clean up stored class attribute

Note
  Default implementation does nothing.

Reimplemented in eZEnumType.

Definition at line 964 of file ezdatatype.php.

## ◆ deleteStoredObjectAttribute()

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

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

Parameters

  eZContentObjectAttribute | $objectAttribute |
  int | $version |

Reimplemented in eZObjectRelationListType, eZMultiPriceType, eZXMLTextType, eZUserType, eZURLType, eZMediaType, eZKeywordType, eZEnumType, and eZBinaryFileType.

Definition at line 956 of file ezdatatype.php.

Referenced by eZImageType\customObjectAttributeHTTPAction().

## ◆ diff()

eZDataType::diff | ( |  | $old,
|  |  | $new,
|  |  | $options = `false`
| ) |  |

Method used by content diff system to retrieve changes in attributes. This method implements the default behaviour, which is to show old and new version values of the object.

Reimplemented in eZProductCategoryType, eZXMLTextType, eZTextType, eZSubtreeSubscriptionType, eZStringType, eZPackageType, eZMultiPriceType, eZIniSettingType, eZEnumType, and eZCountryType.

Definition at line 1390 of file ezdatatype.php.

## ◆ editTemplate()

eZDataType::editTemplate | ( |  | $contentobjectAttribute | ) |

Returns
  the template name to use for editing the attribute.

Note
  Default is to return the datatype string which is OK for most datatypes, if you want dynamic templates reimplement this function and return a template name.
  The returned template name does not include the .tpl extension.

See also
  viewTemplate, informationTemplate

Reimplemented in eZXMLTextType, eZMultiOption2Type, and eZBinaryFileType.

Definition at line 114 of file ezdatatype.php.

References $DataTypeString.

## ◆ eZDataType()

eZDataType::eZDataType | ( |  | $dataTypeString,
|  |  | $name,
|  |  | $properties = `array()`
| ) |  |

Deprecated:
  Use eZDataType::__construct() instead

Parameters

  string | $dataTypeString |
  string | $name |
  array | $properties |

Definition at line 87 of file ezdatatype.php.

References __construct().

## ◆ fetchActionValue()

eZDataType::fetchActionValue | ( |  | $action,
|  |  | $actionName,
|  | & | $value
| ) |  |

Matches the action against the action name $actionName and extracts the value from the action puts it into $value.

Returns
  `true` if the action matched and a value was found, `false` otherwise. \node If no match is made or no value found the $value parameter is not modified.

Definition at line 798 of file ezdatatype.php.

Referenced by eZObjectRelationListType\customObjectAttributeHTTPAction().

## ◆ fetchClassAttributeHTTPInput()

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

Fetches the HTTP input for the content class attribute.

Note
  Default implementation does nothing.

Reimplemented in eZEnumType, eZXMLTextType, eZTimeType, eZTextType, eZStringType, eZSelectionType, eZRangeOptionType, eZPriceType, eZPackageType, eZOptionType, eZObjectRelationListType, eZObjectRelationType, eZMultiPriceType, eZMultiOption2Type, eZMultiOptionType, eZMediaType, eZMatrixType, eZISBNType, eZIntegerType, eZIniSettingType, eZImageType, eZIdentifierType, eZFloatType, eZDateTimeType, eZDateType, eZCountryType, eZBooleanType, eZBinaryFileType, and eZKeywordType.

Definition at line 779 of file ezdatatype.php.

## ◆ fetchCollectionAttributeHTTPInput()

eZDataType::fetchCollectionAttributeHTTPInput | ( |  | $collection,
|  |  | $collectionAttribute,
|  |  | $http,
|  |  | $base,
|  |  | $objectAttribute
| ) |  |

Fetches the HTTP collected information for the content object attribute.

Note
  Default implementation does nothing.

Returns
  true if variable was successfully fetched.

Reimplemented in eZTimeType, eZTextType, eZStringType, eZSelectionType, eZProductCategoryType, eZOptionType, eZMultiOptionType, eZIntegerType, eZEmailType, eZDateTimeType, eZDateType, eZCountryType, and eZBooleanType.

Definition at line 860 of file ezdatatype.php.

## ◆ fetchObjectAttributeHTTPInput()

eZDataType::fetchObjectAttributeHTTPInput | ( |  | $http,
|  |  | $base,
|  |  | $objectAttribute
| ) |  |

Fetches the HTTP input for the content object attribute.

Note
  Default implementation does nothing.

Reimplemented in eZXMLTextType, eZUserType, eZURLType, eZTimeType, eZTextType, eZSubtreeSubscriptionType, eZStringType, eZSelectionType, eZRangeOptionType, eZProductCategoryType, eZPriceType, eZPackageType, eZOptionType, eZObjectRelationListType, eZObjectRelationType, eZMultiPriceType, eZMultiOption2Type, eZMultiOptionType, eZMediaType, eZMatrixType, eZKeywordType, eZISBNType, eZIntegerType, eZIniSettingType, eZImageType, eZIdentifierType, eZFloatType, eZEnumType, eZEmailType, eZDateTimeType, eZDateType, eZCountryType, eZBooleanType, eZBinaryFileType, and eZAuthorType.

Definition at line 831 of file ezdatatype.php.

## ◆ fixRelatedObjectItem()

eZDataType::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 in eZObjectRelationListType.

Definition at line 1360 of file ezdatatype.php.

## ◆ fixupClassAttributeHTTPInput()

eZDataType::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 in eZStringType, eZObjectRelationListType, eZObjectRelationType, eZMediaType, eZIntegerType, eZFloatType, and eZKeywordType.

Definition at line 770 of file ezdatatype.php.

References eZInputValidator\STATE_ACCEPTED.

## ◆ fixupCollectionAttributeHTTPInput()

eZDataType::fixupCollectionAttributeHTTPInput | ( |  | $http,
|  |  | $base,
|  |  | $objectAttribute
| ) |  |

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

Note
  Default implementation does nothing.

Definition at line 850 of file ezdatatype.php.

## ◆ fixupObjectAttributeHTTPInput()

eZDataType::fixupObjectAttributeHTTPInput | ( |  | $http,
|  |  | $base,
|  |  | $objectAttribute
| ) |  |

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

Note
  Default implementation does nothing.

Reimplemented in eZObjectRelationListType, eZIntegerType, and eZFloatType.

Definition at line 823 of file ezdatatype.php.

## ◆ fromString()

eZDataType::fromString | ( |  | $objectAttribute,
|  |  | $string
| ) |  |

Reimplemented in eZMediaType, eZBinaryFileType, eZXMLTextType, eZUserType, eZURLType, eZTimeType, eZTextType, eZSubtreeSubscriptionType, eZStringType, eZSelectionType, eZRangeOptionType, eZProductCategoryType, eZPriceType, eZOptionType, eZObjectRelationListType, eZObjectRelationType, eZMultiPriceType, eZMultiOptionType, eZMatrixType, eZKeywordType, eZISBNType, eZIntegerType, eZIniSettingType, eZIdentifierType, eZFloatType, eZEmailType, eZDateTimeType, eZDateType, eZCountryType, eZBooleanType, and eZAuthorType.

Definition at line 1134 of file ezdatatype.php.

## ◆ getDBAExtensionFilePath()

eZDataType::getDBAExtensionFilePath | ( |  | ) |

Returns dba-data file extension path (relative to the system root folder) for the specific datatype.

Returns
  the first path that is found for the datatype. If not found, it will return false.

Definition at line 1425 of file ezdatatype.php.

References $DataTypeString, eZExtension\activeExtensions(), eZExtension\baseDirectory(), and getDBAFileName().

Referenced by getDBAFilePath().

## ◆ getDBAFileName()

eZDataType::getDBAFileName | ( |  | ) |

Returns dba-data file name of the specific datatype. This one is the default dba-data file name for all datatypes

Definition at line 1403 of file ezdatatype.php.

Referenced by getDBAExtensionFilePath(), and getDBAFilePath().

## ◆ getDBAFilePath()

eZDataType::getDBAFilePath | ( |  | $checkExtensions = `true` | ) |

Returns dba-data file path (relative to the system root folder) for the specific datatype.

Definition at line 1411 of file ezdatatype.php.

References getDBAExtensionFilePath(), and getDBAFileName().

Referenced by importDBDataFromDBAFile().

## ◆ handleCustomObjectHTTPActions()

eZDataType::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 in eZObjectRelationListType.

Definition at line 878 of file ezdatatype.php.

## ◆ handleDownload()

eZDataType::handleDownload | ( |  | $object,
|  |  | $objectVersion,
|  |  | $objectLanguage,
|  |  | $objectAttribute
| ) |  |

\virtual This function is called when someone tries to download the file.

Parameters

  $object | The contentobject in which the attribute is contained
  $objectVersion | The current version of the object it is being worked on
  $objectLanguage | The current language being worked on
  $objectAttribute | The attribute which stored the file

Returns
  `true` if any action has been don or `false` if hasn't.

Reimplemented in eZBinaryFileType.

Definition at line 411 of file ezdatatype.php.

## ◆ hasAttribute()

eZDataType::hasAttribute | ( |  | $attr | ) |

Returns
  true if the attribute $attr exists in this object.

Definition at line 240 of file ezdatatype.php.

## ◆ hasInformationCollection()

eZDataType::hasInformationCollection | ( |  | ) |

Returns
  true if the data type can do information collection

Definition at line 1007 of file ezdatatype.php.

## ◆ hasObjectAttributeContent()

eZDataType::hasObjectAttributeContent | ( |  | $contentObjectAttribute | ) |

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

Reimplemented in eZXMLTextType, eZUserType, eZURLType, eZTimeType, eZTextType, eZSubtreeSubscriptionType, eZStringType, eZSelectionType, eZRangeOptionType, eZProductCategoryType, eZPriceType, eZPackageType, eZOptionType, eZObjectRelationListType, eZObjectRelationType, eZMultiPriceType, eZMultiOption2Type, eZMultiOptionType, eZMediaType, eZMatrixType, eZKeywordType, eZISBNType, eZIntegerType, eZIniSettingType, eZImageType, eZIdentifierType, eZFloatType, eZEnumType, eZEmailType, eZDateTimeType, eZDateType, eZCountryType, eZBooleanType, eZBinaryFileType, and eZAuthorType.

Definition at line 610 of file ezdatatype.php.

## ◆ hasStoredFileInformation()

eZDataType::hasStoredFileInformation | ( |  | $object,
|  |  | $objectVersion,
|  |  | $objectLanguage,
|  |  | $objectAttribute
| ) |  |

\virtual Checks if the datatype supports returning file information.

Parameters

  $object | The contentobject in which the attribute is contained
  $objectVersion | The current version of the object it is being worked on
  $objectLanguage | The current language being worked on
  $objectAttribute | The attribute which stored the file

Returns
  `true` if file information is supported or `false` if it doesn't.

Reimplemented in eZMediaType, eZImageType, and eZBinaryFileType.

Definition at line 394 of file ezdatatype.php.

## ◆ importDBDataFromDBAFile()

eZDataType::importDBDataFromDBAFile | ( |  | $dbaFilePath = `false` | ) |

Used by setup-wizard to update database data using per datatype dba file which is usually placed in share subfolder of the datatype and (share/db_data.dba) Any reimplementation of this method must return true if import is succesfully done, otherwise false.

Definition at line 1450 of file ezdatatype.php.

References cleanDBDataBeforeImport(), getDBAFilePath(), and eZDB\instance().

Referenced by eZISBNType\customClassAttributeHTTPAction().

## ◆ informationTemplate()

eZDataType::informationTemplate | ( |  | $contentobjectAttribute | ) |

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

Note
  Default is to return the datatype string which is OK for most datatypes, if you want dynamic templates reimplement this function and return a template name.
  The returned template name does not include the .tpl extension.

See also
  viewTemplate, editTemplate

Reimplemented in eZXMLTextType, and eZBinaryFileType.

Definition at line 127 of file ezdatatype.php.

References $DataTypeString.

## ◆ initializeClassAttribute()

eZDataType::initializeClassAttribute | ( |  | $classAttribute | ) |

Initializes the class attribute with some data.

Note
  Default implementation does nothing.

Reimplemented in eZXMLTextType, eZTimeType, eZTextType, eZPriceType, eZObjectRelationListType, eZObjectRelationType, eZMultiPriceType, eZISBNType, eZIniSettingType, eZIdentifierType, eZEnumType, eZDateTimeType, and eZDateType.

Definition at line 887 of file ezdatatype.php.

## ◆ initializeObjectAttribute()

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

Initializes the object attribute with some data.

Parameters

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

Reimplemented in eZIniSettingType, eZXMLTextType, eZURLType, eZTimeType, eZTextType, eZStringType, eZSelectionType, eZRangeOptionType, eZProductCategoryType, eZPriceType, eZPackageType, eZOptionType, eZObjectRelationListType, eZObjectRelationType, eZMultiPriceType, eZMultiOption2Type, eZMultiOptionType, eZMatrixType, eZKeywordType, eZIntegerType, eZImageType, eZIdentifierType, eZFloatType, eZEnumType, eZEmailType, eZDateTimeType, eZDateType, eZCountryType, eZBooleanType, eZBinaryFileType, and eZAuthorType.

Definition at line 905 of file ezdatatype.php.

## ◆ insertHTTPFile()

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

\virtual Inserts the HTTP file $httpFile to the content object attribute $objectAttribute.

Parameters

  | $object | The contentobject in which the attribute is contained
  | $objectVersion | The current version of the object it is being worked on
  | $objectLanguage | The current language being worked on
  | $objectAttribute | The attribute which will get the file
  | $httpFile | Object of type eZHTTPFile which contains information on the uploaded file
  | $mimeData | MIME-Type information on the file, can be used to figure out a storage name
  [out] | $result | Array which will be filled with information on the process, it will contain: errors - Array with error elements, each element is an array with `'description'` containing the text require_storage - `true` if the attribute must be stored after this call, or `false` if not required at all

Returns
  `true` if the file was stored correctly in the attribute or `false` if something failed.

Note
  The datatype will return `null` (the default) if does not support HTTP files.
  $result will not be defined if the return value is `null`
  The $httpFile must not be stored prior to calling this, the datatype will handle this internally

See also
  isHTTPFileInsertionSupported()

Reimplemented in eZMediaType, eZImageType, and eZBinaryFileType.

Definition at line 321 of file ezdatatype.php.

References eZDebug\writeWarning().

## ◆ insertRegularFile()

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

\virtual Inserts the file named $filePath to the content object attribute $objectAttribute.

Parameters

  | $object | The contentobject in which the attribute is contained
  | $objectVersion | The current version of the object it is being worked on
  | $objectLanguage | The current language being worked on
  | $objectAttribute | The attribute which will get the file
  | $filePath | Full path including the filename
  [out] | $result | Array which will be filled with information on the process, it will contain: errors - Array with error elements, each element is an array with `'description'` containing the text require_storage - `true` if the attribute must be stored after this call, or `false` if not required at all

Returns
  `true` if the file was stored correctly in the attribute or `false` if something failed.

Note
  The datatype will return `null` (the default) if does not support HTTP files.
  $result will not be defined if the return value is `null`

See also
  isRegularFileInsertionSupported()

Reimplemented in eZMediaType, eZImageType, and eZBinaryFileType.

Definition at line 348 of file ezdatatype.php.

References eZDebug\writeWarning().

## ◆ insertSimpleString()

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

\virtual Inserts the string $string to the content object attribute $objectAttribute.

Parameters

  | $object | The contentobject in which the attribute is contained
  | $objectVersion | The current version of the object it is being worked on
  | $objectLanguage | The current language being worked on
  | $objectAttribute | The attribute which will get the file
  | $filePath | Full path including the filename
  [out] | $result | Array which will be filled with information on the process, it will contain: errors - Array with error elements, each element is an array with `'description'` containing the text require_storage - `true` if the attribute must be stored after this call, or `false` if not required at all

Returns
  `true` if the file was stored correctly in the attribute or `false` if something failed.

Note
  The datatype will return `null` (the default) if does not support HTTP files.
  $result will not be defined if the return value is `null`

See also
  isSimpleStringInsertionSupported()

Reimplemented in eZTextType, eZStringType, and eZCountryType.

Definition at line 375 of file ezdatatype.php.

References eZDebug\writeWarning().

## ◆ isA()

eZDataType::isA | ( |  | ) |

Returns
  the data type identification string.

Definition at line 214 of file ezdatatype.php.

Referenced by createContentObjectAttributeDOMNode(), and serializeContentObjectAttribute().

## ◆ isAddToBasketValidationRequired()

eZDataType::isAddToBasketValidationRequired | ( |  | ) |

Returns
  true if the datatype requires validation during add to basket procedure

Reimplemented in eZMultiOption2Type.

Definition at line 1032 of file ezdatatype.php.

## ◆ isClassAttributeRemovable()

eZDataType::isClassAttributeRemovable | ( |  | $classAttribute | ) |

Queries the datatype if the attribute containing this datatype can be removed from the class. This can be used by datatypes to ensure that very important datatypes that could cause system malfunction is not removed. The datatype will only need to reimplemented this if it wants to do some checking, the default returns `true`.

Returns
  `true` if the class attribute can be removed or `false`.

See also
  classAttributeRemovableInformation()

Note
  The default code will call classAttributeRemovableInformation with $includeAll set to `false`, if it returns false or an empty `'list'` it will return `true`.

Definition at line 1060 of file ezdatatype.php.

References classAttributeRemovableInformation().

## ◆ isHTTPFileInsertionSupported()

eZDataType::isHTTPFileInsertionSupported | ( |  | ) |

Returns
  `true` if the datatype support insertion of HTTP files or `false` (default) otherwise.

See also
  insertHTTPFile()

Reimplemented in eZMediaType, eZImageType, and eZBinaryFileType.

Definition at line 265 of file ezdatatype.php.

## ◆ isIndexable()

eZDataType::isIndexable | ( |  | ) |

Returns
  true if the datatype can be indexed

Reimplemented in eZXMLTextType, eZUserType, eZTextType, eZStringType, eZSelectionType, eZProductCategoryType, eZPackageType, eZObjectRelationListType, eZObjectRelationType, eZMultiOption2Type, eZMultiOptionType, eZMatrixType, eZKeywordType, eZISBNType, eZIntegerType, eZIdentifierType, eZEnumType, eZEmailType, eZDateTimeType, eZDateType, eZCountryType, eZBooleanType, eZBinaryFileType, and eZAuthorType.

Definition at line 1024 of file ezdatatype.php.

Referenced by __construct().

## ◆ isInformationCollector()

eZDataType::isInformationCollector | ( |  | ) |

Returns
  true if the datatype can be used as an information collector

Reimplemented in eZXMLTextType, eZTimeType, eZTextType, eZStringType, eZSelectionType, eZProductCategoryType, eZOptionType, eZIntegerType, eZEmailType, eZDateTimeType, eZDateType, eZCountryType, and eZBooleanType.

Definition at line 1086 of file ezdatatype.php.

Referenced by __construct().

## ◆ isRegularFileInsertionSupported()

eZDataType::isRegularFileInsertionSupported | ( |  | ) |

Returns
  `true` if the datatype support insertion of files or `false` (default) otherwise.

See also
  insertRegularFile()

Reimplemented in eZMediaType, eZImageType, and eZBinaryFileType.

Definition at line 275 of file ezdatatype.php.

## ◆ isRelationType()

eZDataType::isRelationType | ( |  | ) |

Indicates if the datatype handles relations

Returns
  bool

Reimplemented in eZObjectRelationListType, and eZObjectRelationType.

Definition at line 295 of file ezdatatype.php.

## ◆ isSimpleStringInsertionSupported()

eZDataType::isSimpleStringInsertionSupported | ( |  | ) |

Returns
  `true` if the datatype support insertion of simple strings or `false` (default) otherwise.

See also
  insertSimpleString()

Reimplemented in eZTextType, eZStringType, and eZCountryType.

Definition at line 285 of file ezdatatype.php.

## ◆ isTranslatable()

eZDataType::isTranslatable | ( |  | ) |

Indicates if datatype supports being translated

Returns
  bool

Definition at line 224 of file ezdatatype.php.

## ◆ loadAndRegisterAllTypes()

static eZDataType::loadAndRegisterAllTypes | ( |  | ) |
| static

Definition at line 1288 of file ezdatatype.php.

References allowedTypes(), and loadAndRegisterType().

## ◆ loadAndRegisterType()

static eZDataType::loadAndRegisterType | ( |  | $type | ) |
| static

Definition at line 1297 of file ezdatatype.php.

References eZExtension\baseDirectory(), eZDebug\writeError(), and eZDebug\writeWarning().

Referenced by create(), eZUser\isUserObject(), and loadAndRegisterAllTypes().

## ◆ metaData()

eZDataType::metaData | ( |  | $contentObjectAttribute | ) |

Returns
  the text which should be indexed in the search engine. An associative array can be returned to enable searching in specific parts of the data. E.g. array( 'first_column' => "foo", 'second_column' => "bar" );

Reimplemented in eZXMLTextType, eZUserType, eZURLType, eZTimeType, eZTextType, eZStringType, eZSelectionType, eZRangeOptionType, eZProductCategoryType, eZPriceType, eZPackageType, eZOptionType, eZObjectRelationListType, eZObjectRelationType, eZMultiOption2Type, eZMultiOptionType, eZMediaType, eZMatrixType, eZISBNType, eZIntegerType, eZImageType, eZIdentifierType, eZFloatType, eZEnumType, eZEmailType, eZDateTimeType, eZDateType, eZCountryType, eZBooleanType, eZBinaryFileType, eZAuthorType, and eZKeywordType.

Definition at line 1123 of file ezdatatype.php.

## ◆ objectAttributeContent()

eZDataType::objectAttributeContent | ( |  | $objectAttribute | ) |

Returns the content data for the given content object attribute.

Reimplemented in eZXMLTextType, eZUserType, eZURLType, eZTimeType, eZTextType, eZStringType, eZSelectionType, eZRangeOptionType, eZProductCategoryType, eZPriceType, eZPackageType, eZOptionType, eZObjectRelationListType, eZObjectRelationType, eZMultiPriceType, eZMultiOption2Type, eZMultiOptionType, eZMediaType, eZMatrixType, eZISBNType, eZIntegerType, eZIniSettingType, eZImageType, eZIdentifierType, eZFloatType, eZEnumType, eZEmailType, eZDateTimeType, eZDateType, eZCountryType, eZBooleanType, eZBinaryFileType, eZAuthorType, and eZKeywordType.

Definition at line 601 of file ezdatatype.php.

## ◆ objectDisplayInformation()

eZDataType::objectDisplayInformation | ( |  | $objectAttribute,
|  |  | $mergeInfo = `false`
| ) |  |

\virtual Will return information on how the datatype should be represented in the various display modes when used by an object.

If this method is reimplemented the implementor must call this method with the new info array as second parameter.

Parameters

  $objectAttribute | The content object attribute to return info for.
  $mergeInfo | A structure that must match the returned array, or `false` to ignore. Any entries here will override the default.

Returns
  An array structure which contains:
  - `edit`
    - `grouped_input` - If `true` then the datatype has lots of input elements that should be grouped. (e.g. in a fieldset) EditSettings/GroupedInput in datatype.ini is used to automatically determine this field

- `view`
- `collection`
  - `grouped_input` - If `true` then the datatype has lots of input elements that should be grouped. (e.g. in a fieldset) CollectionSettings/GroupedInput in datatype.ini is used to automatically determine this field and will override the default and datatype setting if used.

- `result`

Reimplemented in eZObjectRelationType, and eZEnumType.

Definition at line 496 of file ezdatatype.php.

Referenced by eZEnumType\objectDisplayInformation(), and eZObjectRelationType\objectDisplayInformation().

## ◆ onPublish()

eZDataType::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 in eZXMLTextType, eZObjectRelationListType, eZIniSettingType, eZIdentifierType, and eZSubtreeSubscriptionType.

Definition at line 646 of file ezdatatype.php.

## ◆ postInitializeObjectAttribute()

eZDataType::postInitializeObjectAttribute | ( |  | $objectAttribute,
|  |  | $currentVersion,
|  |  | $originalContentObjectAttribute
| ) |  |

Initializes the object attribute with some data after object attribute is already stored. It means that for initial version you allready have an attribute_id and you can store data somewhere using this id.

Note
  Default implementation does nothing.

Reimplemented in eZXMLTextType, eZMultiPriceType, and eZMediaType.

Definition at line 922 of file ezdatatype.php.

## ◆ postStore()

eZDataType::postStore | ( |  | $objectAttribute | ) |

Reimplemented in eZURLType, and eZImageType.

Definition at line 929 of file ezdatatype.php.

## ◆ postUnserializeContentObjectAttribute()

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

Reimplemented in eZXMLTextType, eZObjectRelationListType, and eZObjectRelationType.

Definition at line 1271 of file ezdatatype.php.

## ◆ preStoreClassAttribute()

eZDataType::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 in eZObjectRelationListType, eZObjectRelationType, eZMatrixType, eZISBNType, eZIdentifierType, and eZCountryType.

Definition at line 657 of file ezdatatype.php.

Referenced by preStoreDefinedClassAttribute(), and preStoreModifiedClassAttribute().

## ◆ preStoreDefinedClassAttribute()

eZDataType::preStoreDefinedClassAttribute | ( |  | $classAttribute | ) |

Parameters

  eZContentClassAttribute | $classAttribute | Content class attribute of the datatype

Reimplemented in eZIdentifierType.

Definition at line 721 of file ezdatatype.php.

References preStoreClassAttribute().

Referenced by preStoreVersionedClassAttribute().

## ◆ preStoreModifiedClassAttribute()

eZDataType::preStoreModifiedClassAttribute | ( |  | $classAttribute | ) |

Parameters

  eZContentClassAttribute | $classAttribute | Content class attribute of the datatype

Definition at line 729 of file ezdatatype.php.

References preStoreClassAttribute().

Referenced by preStoreVersionedClassAttribute().

## ◆ preStoreVersionedClassAttribute()

eZDataType::preStoreVersionedClassAttribute | ( |  | $classAttribute,
|  |  | $version
| ) |  |

Hook function which is called before an content class attribute is stored

See also
  eZContentClassAttribute::storeVersioned()

Parameters

  eZContentClassAttribute | $classAttribute | Content class attribute of the datatype
  int | $version | Version of the attribute to be stored

Definition at line 741 of file ezdatatype.php.

References preStoreDefinedClassAttribute(), preStoreModifiedClassAttribute(), eZContentClass\VERSION_STATUS_DEFINED, and eZContentClass\VERSION_STATUS_MODIFIED.

## ◆ productOptionInformation()

eZDataType::productOptionInformation | ( |  | $objectAttribute,
|  |  | $optionID,
|  |  | $productItem
| ) |  |

Fetches the product option information for option with ID $optionID and returns this information. This will be called from the basket when a new product with an option is added, it is then up to the specific datatype to return proper data. It will also be used to recalcuate prices.

Parameters

  $objectAttribute | The attribute that the datatype controls.
  $optionID | The ID of the option which information should be returned from.
  $productItem | The product item object which contains the option, is available for reading only.

Returns
  An array structure which contains:
  - id - The unique ID of the selected option, this must be unique in the attribute and will later on be used to recalculate prices.
  - name - The name of the option list
  - value - The display string of the selected option
  - additional_price - A value which is added to the total product price, set to 0 or `false` if no price is used. If the option could not be found it should return `false`, if not supported it should return `null`.

See also
  handleProductOption

Reimplemented in eZRangeOptionType, eZOptionType, eZMultiOption2Type, and eZMultiOptionType.

Definition at line 462 of file ezdatatype.php.

References eZDebug\writeWarning().

## ◆ register()

static eZDataType::register | ( |  | $dataTypeString,
|  |  | $className
| ) |  |
| static

Registers the datatype with string id $dataTypeString and class name $className. The class name is used for instantiating the class and should be in lowercase letters.

Definition at line 203 of file ezdatatype.php.

## ◆ registeredDataTypes()

static eZDataType::registeredDataTypes | ( |  | ) |
| static

Returns
  a list of datatypes which has been registered.

Note
  This will instantiate all datatypes.

Definition at line 179 of file ezdatatype.php.

## ◆ removeRelatedObjectItem()

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

Removes objects with given ID from the relations list

Note
  Default implementation does nothing.

Reimplemented in eZObjectRelationListType, and eZObjectRelationType.

Definition at line 1352 of file ezdatatype.php.

## ◆ repairContentObjectAttribute()

eZDataType::repairContentObjectAttribute | ( |  | $contentObjectAttribute | ) |

Tries to do a repair on the content object attribute $contentObjectAttribute and returns `true` if it succeeds.

Returns
  `false` if it fails or `null` if it is not supported to do a repair.

Definition at line 913 of file ezdatatype.php.

## ◆ restoreTrashedObjectAttribute()

eZDataType::restoreTrashedObjectAttribute | ( |  | $objectAttribute | ) |

Restores the content object attribute $objectAttribute from trash Default implementation does nothing

Parameters

  eZContentObjectAttribute | $objectAttribute |

Reimplemented in eZImageType.

Definition at line 946 of file ezdatatype.php.

## ◆ resultTemplate()

eZDataType::resultTemplate | ( | & | $collectionAttribute | ) |

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

Note
  Default is to return the datatype string which is OK for most datatypes, if you want dynamic templates reimplement this function and return a template name.
  The returned template name does not include the .tpl extension.
  $collectionAttribute can in some cases be a eZContentObjectAttribute, so any datatype that overrides this must be able to handle both types.

Definition at line 141 of file ezdatatype.php.

References $DataTypeString.

## ◆ serializeContentClassAttribute()

eZDataType::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 in eZXMLTextType, eZTimeType, eZTextType, eZStringType, eZSelectionType, eZRangeOptionType, eZPriceType, eZPackageType, eZOptionType, eZObjectRelationListType, eZObjectRelationType, eZMultiPriceType, eZMultiOption2Type, eZMultiOptionType, eZMediaType, eZMatrixType, eZIntegerType, eZIniSettingType, eZImageType, eZIdentifierType, eZFloatType, eZEnumType, eZDateTimeType, eZDateType, eZBooleanType, and eZBinaryFileType.

Definition at line 1160 of file ezdatatype.php.

## ◆ serializeContentObjectAttribute()

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

Parameters

  package |
  objectAttribute | content attribute

Returns
  a DOM representation of the content object attribute

Reimplemented in eZXMLTextType, eZUserType, eZURLType, eZTimeType, eZSubtreeSubscriptionType, eZRangeOptionType, eZOptionType, eZObjectRelationListType, eZObjectRelationType, eZMultiPriceType, eZMultiOption2Type, eZMultiOptionType, eZMediaType, eZMatrixType, eZKeywordType, eZIniSettingType, eZImageType, eZDateTimeType, eZDateType, eZBinaryFileType, eZAuthorType, and eZEnumType.

Definition at line 1181 of file ezdatatype.php.

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

## ◆ sortKey()

eZDataType::sortKey | ( |  | $objectAttribute | ) |

Returns
  the sort key for the datatype. This is used for sorting on attribute level.

Reimplemented in eZTimeType, eZStringType, eZSelectionType, eZProductCategoryType, eZPriceType, eZPackageType, eZObjectRelationType, eZIntegerType, eZIdentifierType, eZEmailType, eZDateTimeType, eZDateType, eZCountryType, and eZBooleanType.

Definition at line 1094 of file ezdatatype.php.

## ◆ sortKeyType()

eZDataType::sortKeyType | ( |  | ) |

Returns
  the type of the sort key int|string False is returned if sorting is not supported

Reimplemented in eZTimeType, eZStringType, eZSelectionType, eZProductCategoryType, eZPriceType, eZPackageType, eZObjectRelationType, eZIntegerType, eZIdentifierType, eZEmailType, eZDateTimeType, eZDateType, eZCountryType, and eZBooleanType.

Definition at line 1103 of file ezdatatype.php.

## ◆ storeClassAttribute()

eZDataType::storeClassAttribute | ( |  | $classAttribute,
|  |  | $version
| ) |  |

Stores the datatype data to the database which is related to the class attribute. The $version parameter determines which version is currently being stored, 0 is the real version while 1 is the temporary version.

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.
  This function is called after the attribute data has been stored. If you need to alter attribute data use preStoreClassAttribute instead.

See also
  fetchClassAttributeHTTPInput

Reimplemented in eZMatrixType, eZEnumType, eZURLType, eZStringType, eZMediaType, eZKeywordType, eZIntegerType, and eZFloatType.

Definition at line 674 of file ezdatatype.php.

## ◆ storeDefinedClassAttribute()

eZDataType::storeDefinedClassAttribute | ( |  | $classAttribute | ) |

Note
  Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Parameters

  eZContentClassAttribute | $classAttribute | Content class attribute of the datatype

Reimplemented in eZEnumType, eZURLType, eZStringType, eZMediaType, and eZKeywordType.

Definition at line 685 of file ezdatatype.php.

Referenced by storeVersionedClassAttribute().

## ◆ storedFileInformation()

eZDataType::storedFileInformation | ( |  | $object,
|  |  | $objectVersion,
|  |  | $objectLanguage,
|  |  | $objectAttribute
| ) |  |

\virtual Returns file information for the filed stored by the attribute.

Parameters

  $object | The contentobject in which the attribute is contained
  $objectVersion | The current version of the object it is being worked on
  $objectLanguage | The current language being worked on
  $objectAttribute | The attribute which stored the file

Returns
  An array structure with information or `false` (default) if no information could be found. The structure must contain:
  - filepath - The full path to the file

The structure can contain:

- filename - The name of the file, if not supplied it will be figured out from the filepath
- filesize - The size of the file, if not supplied it will be figured out from the filepath
- mime_type - The MIME type for the file, if not supplied it will be figured out from the filepath

Reimplemented in eZMediaType, eZImageType, and eZBinaryFileType.

Definition at line 439 of file ezdatatype.php.

## ◆ storeModifiedClassAttribute()

eZDataType::storeModifiedClassAttribute | ( |  | $classAttribute | ) |

Note
  Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Parameters

  eZContentClassAttribute | $classAttribute | Content class attribute of the datatype

Reimplemented in eZEnumType.

Definition at line 694 of file ezdatatype.php.

Referenced by storeVersionedClassAttribute().

## ◆ storeObjectAttribute()

eZDataType::storeObjectAttribute | ( |  | $objectAttribute | ) |

Stores the datatype data to the database which is related to the object attribute.

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.

See also
  fetchObjectAttributeHTTPInput

Reimplemented in eZIntegerType, eZRangeOptionType, eZOptionType, eZMultiOption2Type, eZMultiOptionType, eZMediaType, eZMatrixType, eZImageType, eZIdentifierType, eZEnumType, eZCountryType, eZBinaryFileType, eZAuthorType, eZXMLTextType, eZURLType, eZTextType, eZStringType, eZPriceType, eZPackageType, eZMultiPriceType, eZKeywordType, eZISBNType, eZFloatType, eZEmailType, and eZBooleanType.

Definition at line 632 of file ezdatatype.php.

## ◆ storeVersionedClassAttribute()

eZDataType::storeVersionedClassAttribute | ( |  | $classAttribute,
|  |  | $version
| ) |  |

Note
  Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Parameters

  eZContentClassAttribute | $classAttribute | Content class attribute of the datatype
  int | $version | Version of the attribute to be stored

Definition at line 704 of file ezdatatype.php.

References storeDefinedClassAttribute(), storeModifiedClassAttribute(), eZContentClass\VERSION_STATUS_DEFINED, and eZContentClass\VERSION_STATUS_MODIFIED.

## ◆ supportsBatchInitializeObjectAttribute()

eZDataType::supportsBatchInitializeObjectAttribute | ( |  | ) |

Reimplemented in eZXMLTextType, eZURLType, eZTimeType, eZTextType, eZStringType, eZSelectionType, eZRangeOptionType, eZProductCategoryType, eZPriceType, eZOptionType, eZObjectRelationListType, eZObjectRelationType, eZMultiPriceType, eZMultiOption2Type, eZMediaType, eZMatrixType, eZKeywordType, eZISBNType, eZIntegerType, eZImageType, eZFloatType, eZEmailType, eZDateTimeType, eZDateType, eZCountryType, eZBooleanType, eZBinaryFileType, and eZAuthorType.

Definition at line 1508 of file ezdatatype.php.

## ◆ templateList()

eZDataType::templateList | ( |  | ) |

Can be called to figure out if a datatype has certain special templates that it relies on. This can for instance be used to figure out which override templates to include in a package.

Returns
  An array with template files that this datatype relies on. Each element can be one of the following types:
  - string - The filepath of the template
  - array - Advanced matching criteria, element 0 determines the type:
    - 'regexp' - A regular expression, element 1 is the regexp string (PREG) If `false` is returned it means there are no relations to any templates.

Note
  All matching is done relative from templates directory in the given design.
  The templates that are found in content/datatype/* should not be included.

Reimplemented in eZXMLTextType.

Definition at line 1150 of file ezdatatype.php.

## ◆ title()

eZDataType::title | ( |  | $objectAttribute,
|  |  | $name = `null`
| ) |  |

Returns the title of the current type, this is to form the title of the object.

Reimplemented in eZTextType, eZISBNType, eZXMLTextType, eZURLType, eZTimeType, eZStringType, eZSelectionType, eZRangeOptionType, eZProductCategoryType, eZPriceType, eZPackageType, eZObjectRelationListType, eZObjectRelationType, eZMultiPriceType, eZIntegerType, eZIniSettingType, eZIdentifierType, eZFloatType, eZEnumType, eZEmailType, eZDateTimeType, eZDateType, eZCountryType, eZBooleanType, eZAuthorType, eZImageType, eZMatrixType, eZMediaType, eZBinaryFileType, eZOptionType, eZMultiOptionType, eZUserType, and eZKeywordType.

Definition at line 1016 of file ezdatatype.php.

## ◆ toString()

eZDataType::toString | ( |  | $objectAttribute | ) |

Returns
  string representation of an contentobjectattribute data for simplified export

Reimplemented in eZMediaType, eZImageType, eZBinaryFileType, eZXMLTextType, eZUserType, eZURLType, eZTimeType, eZTextType, eZSubtreeSubscriptionType, eZStringType, eZSelectionType, eZRangeOptionType, eZProductCategoryType, eZPriceType, eZOptionType, eZObjectRelationListType, eZObjectRelationType, eZMultiPriceType, eZMultiOptionType, eZMatrixType, eZKeywordType, eZISBNType, eZIntegerType, eZIniSettingType, eZIdentifierType, eZFloatType, eZEmailType, eZDateTimeType, eZDateType, eZCountryType, eZBooleanType, and eZAuthorType.

Definition at line 1130 of file ezdatatype.php.

## ◆ trashStoredObjectAttribute()

eZDataType::trashStoredObjectAttribute | ( |  | $objectAttribute,
|  |  | $version = `null`
| ) |  |

Do any necessary changes to stored object attribute when moving an object to trash.

Note
  Default implementation does nothing.

Reimplemented in eZMediaType, eZImageType, and eZBinaryFileType.

Definition at line 937 of file ezdatatype.php.

## ◆ unserializeContentClassAttribute()

eZDataType::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 in eZXMLTextType, eZTimeType, eZTextType, eZStringType, eZSelectionType, eZRangeOptionType, eZPriceType, eZPackageType, eZOptionType, eZObjectRelationListType, eZObjectRelationType, eZMultiPriceType, eZMultiOption2Type, eZMultiOptionType, eZMediaType, eZMatrixType, eZIntegerType, eZIniSettingType, eZImageType, eZIdentifierType, eZFloatType, eZEnumType, eZDateTimeType, eZDateType, eZBooleanType, and eZBinaryFileType.

Definition at line 1171 of file ezdatatype.php.

## ◆ unserializeContentObjectAttribute()

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

Unserialize contentobject attribute

Parameters

  package |
  objectAttribute | contentobject attribute object
  attributeNode | ezdomnode object

Reimplemented in eZXMLTextType, eZUserType, eZURLType, eZTimeType, eZSubtreeSubscriptionType, eZRangeOptionType, eZOptionType, eZObjectRelationListType, eZObjectRelationType, eZMultiPriceType, eZMultiOption2Type, eZMultiOptionType, eZMediaType, eZMatrixType, eZKeywordType, eZIniSettingType, eZImageType, eZEnumType, eZDateTimeType, eZDateType, eZBinaryFileType, and eZAuthorType.

Definition at line 1233 of file ezdatatype.php.

References eZDebug\writeError().

## ◆ validateAddToBasket()

eZDataType::validateAddToBasket | ( |  | $objectAttribute,
|  |  | $data,
|  | & | $errors
| ) |  |

Validates the input for an object attribute during add to basket process and returns a validation state as defined in eZInputValidator.

Note
  Default implementation does nothing and returns accepted.

Reimplemented in eZMultiOption2Type.

Definition at line 1041 of file ezdatatype.php.

References eZInputValidator\STATE_ACCEPTED.

## ◆ validateClassAttributeHTTPInput()

eZDataType::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 in eZSelectionType, eZEnumType, eZURLType, eZStringType, eZObjectRelationListType, eZObjectRelationType, eZMediaType, eZIntegerType, eZIniSettingType, eZIdentifierType, eZFloatType, and eZKeywordType.

Definition at line 760 of file ezdatatype.php.

References eZInputValidator\STATE_ACCEPTED.

## ◆ validateCollectionAttributeHTTPInput()

eZDataType::validateCollectionAttributeHTTPInput | ( |  | $http,
|  |  | $base,
|  |  | $objectAttribute
| ) |  |

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

Note
  Default implementation does nothing and returns accepted.

Reimplemented in eZTimeType, eZTextType, eZStringType, eZSelectionType, eZOptionType, eZIntegerType, eZEmailType, eZDateTimeType, eZDateType, eZCountryType, and eZBooleanType.

Definition at line 840 of file ezdatatype.php.

References eZInputValidator\STATE_ACCEPTED.

## ◆ validateObjectAttributeHTTPInput()

eZDataType::validateObjectAttributeHTTPInput | ( |  | $http,
|  |  | $base,
|  |  | $objectAttribute
| ) |  |

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

Note
  Default implementation does nothing and returns accepted.

Reimplemented in eZXMLTextType, eZUserType, eZURLType, eZTimeType, eZTextType, eZStringType, eZSelectionType, eZRangeOptionType, eZProductCategoryType, eZPriceType, eZPackageType, eZOptionType, eZObjectRelationListType, eZObjectRelationType, eZMultiPriceType, eZMultiOption2Type, eZMultiOptionType, eZMediaType, eZMatrixType, eZKeywordType, eZISBNType, eZIntegerType, eZIniSettingType, eZImageType, eZIdentifierType, eZFloatType, eZEnumType, eZEmailType, eZDateTimeType, eZDateType, eZCountryType, eZBooleanType, eZBinaryFileType, and eZAuthorType.

Definition at line 813 of file ezdatatype.php.

References eZInputValidator\STATE_ACCEPTED.

## ◆ viewTemplate()

eZDataType::viewTemplate | ( |  | $contentobjectAttribute | ) |

Returns
  the template name to use for viewing the attribute.

Note
  Default is to return the datatype string which is OK for most datatypes, if you want dynamic templates reimplement this function and return a template name.
  The returned template name does not include the .tpl extension.

See also
  editTemplate, informationTemplate

Reimplemented in eZXMLTextType, and eZBinaryFileType.

Definition at line 101 of file ezdatatype.php.

References $DataTypeString.

## Member Data Documentation

## ◆ $Attributes

eZDataType::$Attributes

Definition at line 47 of file ezdatatype.php.

## ◆ $DataTypeString

eZDataType::$DataTypeString

The datatype string ID, used for uniquely identifying a datatype.

Definition at line 1515 of file ezdatatype.php.

Referenced by eZBinaryFileType\editTemplate(), eZMultiOption2Type\editTemplate(), eZXMLTextType\editTemplate(), editTemplate(), getDBAExtensionFilePath(), eZBinaryFileType\informationTemplate(), eZXMLTextType\informationTemplate(), informationTemplate(), resultTemplate(), eZBinaryFileType\viewTemplate(), eZXMLTextType\viewTemplate(), and viewTemplate().

## ◆ $Name

eZDataType::$Name

The descriptive name of the datatype, usually used for displaying to the user.

Definition at line 1517 of file ezdatatype.php.

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

- ezdatatype.php

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