Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

Public Member Functions | Public Attributes | List of all members
eZEnumType Class Reference
Inheritance diagram for eZEnumType:

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

## Public Attributes
const | DATA_TYPE_STRING = 'ezenum'
const | IS_MULTIPLE_FIELD = 'data_int1'
const | IS_MULTIPLE_VARIABLE = '_ezenum_ismultiple_value_'
const | IS_OPTION_FIELD = 'data_int2'
const | IS_OPTION_VARIABLE = '_ezenum_isoption_value_'
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...

## Additional Inherited Members
Static Public Member Functions inherited from eZDataType
static | create ( $dataTypeString)
static | registeredDataTypes ()
static | register ( $dataTypeString, $className)
static | allowedTypes ()
static | loadAndRegisterAllTypes ()
static | loadAndRegisterType ( $type)

## Detailed Description

Definition at line 17 of file ezenumtype.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZEnumType::__construct | ( |  | ) |

Definition at line 25 of file ezenumtype.php.

References ezpI18n\tr().

## Member Function Documentation

## ◆ classAttributeContent()

eZEnumType::classAttributeContent | ( |  | $contentClassAttribute | ) |

Returns the content.

Reimplemented from eZDataType.

Definition at line 294 of file ezenumtype.php.

## ◆ cloneClassAttribute()

eZEnumType::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 from eZDataType.

Definition at line 63 of file ezenumtype.php.

References eZEnumValue\fetchAllElements(), and eZDB\instance().

## ◆ customClassAttributeHTTPAction()

eZEnumType::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 302 of file ezenumtype.php.

References eZDebug\writeError().

## ◆ deleteStoredClassAttribute()

eZEnumType::deleteStoredClassAttribute | ( |  | $contentClassAttribute,
|  |  | $version = `null`
| ) |  |

Delete stored class attribute

Reimplemented from eZDataType.

Definition at line 117 of file ezenumtype.php.

References eZEnumValue\removeAllElements().

## ◆ deleteStoredObjectAttribute()

eZEnumType::deleteStoredObjectAttribute | ( |  | $contentObjectAttribute,
|  |  | $version = `null`
| ) |  |

Delete stored object attribute

Reimplemented from eZDataType.

Definition at line 107 of file ezenumtype.php.

References eZEnumObjectValue\removeAllElements().

Referenced by initializeObjectAttribute().

## ◆ diff()

eZEnumType::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 from eZDataType.

Definition at line 513 of file ezenumtype.php.

## ◆ fetchClassAttributeHTTPInput()

eZEnumType::fetchClassAttributeHTTPInput | ( |  | $http,
|  |  | $base,
|  |  | $contentClassAttribute
| ) |  |

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

Reimplemented from eZDataType.

Definition at line 243 of file ezenumtype.php.

## ◆ fetchObjectAttributeHTTPInput()

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

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

Reimplemented from eZDataType.

Definition at line 127 of file ezenumtype.php.

References eZDB\instance(), eZEnum\removeObjectEnumerations(), and eZEnum\storeObjectEnumeration().

## ◆ hasObjectAttributeContent()

eZEnumType::hasObjectAttributeContent | ( |  | $contentObjectAttribute | ) |

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

Reimplemented from eZDataType.

Definition at line 460 of file ezenumtype.php.

## ◆ initializeClassAttribute()

eZEnumType::initializeClassAttribute | ( |  | $classAttribute | ) |

Set class attribute value for template version

Reimplemented from eZDataType.

Definition at line 85 of file ezenumtype.php.

References eZEnumValue\fetchAllElements(), and eZDB\instance().

## ◆ initializeObjectAttribute()

eZEnumType::initializeObjectAttribute | ( |  | $contentObjectAttribute,
|  |  | $currentVersion,
|  |  | $originalContentObjectAttribute
| ) |  |

Sets value according to current version

Reimplemented from eZDataType.

Definition at line 34 of file ezenumtype.php.

References deleteStoredObjectAttribute(), eZEnumObjectValue\fetchAllElements(), and eZDB\instance().

## ◆ isIndexable()

eZEnumType::isIndexable | ( |  | ) |

Returns
  true if the datatype can be indexed

Reimplemented from eZDataType.

Definition at line 393 of file ezenumtype.php.

## ◆ metaData()

eZEnumType::metaData | ( |  | $contentObjectAttribute | ) |

Returns the meta data used for storing search indeces.

Reimplemented from eZDataType.

Definition at line 355 of file ezenumtype.php.

## ◆ objectAttributeContent()

eZEnumType::objectAttributeContent | ( |  | $contentObjectAttribute | ) |

Returns actual the class attribute content.

Reimplemented from eZDataType.

Definition at line 215 of file ezenumtype.php.

Referenced by title().

## ◆ objectDisplayInformation()

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

Sets `grouped_input` to `true` when checkboxes or radiobuttons are used.

Reimplemented from eZDataType.

Definition at line 382 of file ezenumtype.php.

References eZDataType\objectDisplayInformation().

## ◆ serializeContentClassAttribute()

eZEnumType::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 465 of file ezenumtype.php.

## ◆ serializeContentObjectAttribute()

eZEnumType::serializeContentObjectAttribute | ( |  | $package,
|  |  | $contentObjectAttribute
| ) |  |

Returns
  a DOM representation of the content object attribute

Reimplemented from eZDataType.

Definition at line 402 of file ezenumtype.php.

References eZDataType\createContentObjectAttributeDOMNode(), and eZEnumObjectValue\fetchAllElements().

## ◆ storeClassAttribute()

eZEnumType::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 from eZDataType.

Definition at line 276 of file ezenumtype.php.

## ◆ storeDefinedClassAttribute()

eZEnumType::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 from eZDataType.

Definition at line 281 of file ezenumtype.php.

References eZContentClass\VERSION_STATUS_DEFINED.

## ◆ storeModifiedClassAttribute()

eZEnumType::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 from eZDataType.

Definition at line 286 of file ezenumtype.php.

References eZContentClass\VERSION_STATUS_MODIFIED.

## ◆ storeObjectAttribute()

eZEnumType::storeObjectAttribute | ( |  | $contentObjectAttribute | ) |

Does nothing since it has been stored. See fetchObjectAttributeHTTPInput for the actual storing.

Reimplemented from eZDataType.

Definition at line 208 of file ezenumtype.php.

## ◆ title()

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

Returns the object attribute title.

Reimplemented from eZDataType.

Definition at line 334 of file ezenumtype.php.

References objectAttributeContent().

## ◆ unserializeContentClassAttribute()

eZEnumType::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 486 of file ezenumtype.php.

References eZEnumValue\create().

## ◆ unserializeContentObjectAttribute()

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

Unserialize contentobject attribute

Parameters

  package |
  contentobject | attribute object
  ezdomnode | object

Reimplemented from eZDataType.

Definition at line 432 of file ezenumtype.php.

References eZEnum\storeObjectEnumeration(), and eZDebug\writeError().

## ◆ validateClassAttributeHTTPInput()

eZEnumType::validateClassAttributeHTTPInput | ( |  | $http,
|  |  | $base,
|  |  | $contentClassAttribute
| ) |  |

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

Reimplemented from eZDataType.

Definition at line 235 of file ezenumtype.php.

References eZInputValidator\STATE_ACCEPTED.

## ◆ validateObjectAttributeHTTPInput()

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

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

Reimplemented from eZDataType.

Definition at line 184 of file ezenumtype.php.

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

## Member Data Documentation

## ◆ DATA_TYPE_STRING

const eZEnumType::DATA_TYPE_STRING = 'ezenum'

Definition at line 19 of file ezenumtype.php.

## ◆ IS_MULTIPLE_FIELD

const eZEnumType::IS_MULTIPLE_FIELD = 'data_int1'

Definition at line 20 of file ezenumtype.php.

## ◆ IS_MULTIPLE_VARIABLE

const eZEnumType::IS_MULTIPLE_VARIABLE = '_ezenum_ismultiple_value_'

Definition at line 21 of file ezenumtype.php.

## ◆ IS_OPTION_FIELD

const eZEnumType::IS_OPTION_FIELD = 'data_int2'

Definition at line 22 of file ezenumtype.php.

## ◆ IS_OPTION_VARIABLE

const eZEnumType::IS_OPTION_VARIABLE = '_ezenum_isoption_value_'

Definition at line 23 of file ezenumtype.php.

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

- ezenumtype.php

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