Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

Public Member Functions | Public Attributes | List of all members
eZMultiOptionType Class Reference

A datatype which works with multiple options. More...

Inheritance diagram for eZMultiOptionType:

## Public Member Functions
| __construct ()
| validateObjectAttributeHTTPInput ( $http, $base, $contentObjectAttribute)
| storeObjectAttribute ( $contentObjectAttribute)
| objectAttributeContent ( $contentObjectAttribute)
| isIndexable ()
| metaData ( $contentObjectAttribute)
| fetchObjectAttributeHTTPInput ( $http, $base, $contentObjectAttribute)
| fetchCollectionAttributeHTTPInput ( $collection, $collectionAttribute, $http, $base, $contentObjectAttribute)
| customObjectAttributeHTTPAction ( $http, $action, $contentObjectAttribute, $parameters)
| productOptionInformation ( $objectAttribute, $optionID, $productItem)
| title ( $contentObjectAttribute, $name="name")
| hasObjectAttributeContent ( $contentObjectAttribute)
| initializeObjectAttribute ( $contentObjectAttribute, $currentVersion, $originalContentObjectAttribute)
| fetchClassAttributeHTTPInput ( $http, $base, $classAttribute)
| toString ( $contentObjectAttribute)
| fromString ( $contentObjectAttribute, $string)
| serializeContentClassAttribute ( $classAttribute, $attributeNode, $attributeParametersNode)
| unserializeContentClassAttribute ( $classAttribute, $attributeNode, $attributeParametersNode)
| serializeContentObjectAttribute ( $package, $objectAttribute)
| unserializeContentObjectAttribute ( $package, $objectAttribute, $attributeNode)
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)
| objectDisplayInformation ( $objectAttribute, $mergeInfo=false)
| classDisplayInformation ( $classAttribute, $mergeInfo=false)
| classAttributeContent ( $classAttribute)
| 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)
| customClassAttributeHTTPAction ( $http, $action, $classAttribute)
| fetchActionValue ( $action, $actionName, &$value)
| fixupObjectAttributeHTTPInput ( $http, $base, $objectAttribute)
| validateCollectionAttributeHTTPInput ( $http, $base, $objectAttribute)
| fixupCollectionAttributeHTTPInput ( $http, $base, $objectAttribute)
| handleCustomObjectHTTPActions ( $http, $attributeDataBaseName, $customActionAttributeArray, $customActionParameters)
| initializeClassAttribute ( $classAttribute)
| cloneClassAttribute ( $oldClassAttribute, $newClassAttribute)
| 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 ()
| isAddToBasketValidationRequired ()
| validateAddToBasket ( $objectAttribute, $data, &$errors)
| isClassAttributeRemovable ( $classAttribute)
| classAttributeRemovableInformation ( $classAttribute, $includeAll=true)
| isInformationCollector ()
| sortKey ( $objectAttribute)
| sortKeyType ()
| customSorting ()
| customSortingSQL ( $params)
| templateList ()
| 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 ()

## Public Attributes
const | DEFAULT_NAME_VARIABLE = "_ezmultioption_default_name_"
const | DATA_TYPE_STRING = "ezmultioption"
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

A datatype which works with multiple options.

This allows the user to add several option choices almost as if he was adding attributes with option datatypes.

This class implements the interface for a datatype but passes most of the work over to the eZMultiOption class which handles parsing, storing and manipulation of multioptions and options.

This datatype supports:

- fetch and validation of HTTP data
- search indexing
- product option information
- class title
- class serialization

Definition at line 32 of file ezmultioptiontype.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZMultiOptionType::__construct | ( |  | ) |

Definition at line 37 of file ezmultioptiontype.php.

References ezpI18n\tr().

## Member Function Documentation

## ◆ customObjectAttributeHTTPAction()

eZMultiOptionType::customObjectAttributeHTTPAction | ( |  | $http,
|  |  | $action,
|  |  | $contentObjectAttribute,
|  |  | $parameters
| ) |  |

This function performs specific actions.

It has some special actions with parameters which is done by exploding $action into several parts with delimeter '_'. The first element is the name of specific action to perform. The second element will contain the key value or id.

The various operation's that is performed by this function are as follow.

- new-option - A new option is added to a multioption.
- remove-selected-option - Removes a selected option.
- new_multioption - Adds a new multioption.
- remove_selected_multioption - Removes all multioptions given by a selection list

Reimplemented from eZDataType.

Definition at line 224 of file ezmultioptiontype.php.

References eZDebug\writeError().

## ◆ fetchClassAttributeHTTPInput()

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

Fetches the HTTP input for the content class attribute.

Note
  Default implementation does nothing.

Reimplemented from eZDataType.

Definition at line 339 of file ezmultioptiontype.php.

## ◆ fetchCollectionAttributeHTTPInput()

eZMultiOptionType::fetchCollectionAttributeHTTPInput | ( |  | $collection,
|  |  | $collectionAttribute,
|  |  | $http,
|  |  | $base,
|  |  | $contentObjectAttribute
| ) |  |

Fetches the http post variables for collected information

Reimplemented from eZDataType.

Definition at line 203 of file ezmultioptiontype.php.

## ◆ fetchObjectAttributeHTTPInput()

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

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

Reimplemented from eZDataType.

Definition at line 158 of file ezmultioptiontype.php.

## ◆ fromString()

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

Reimplemented from eZDataType.

Definition at line 384 of file ezmultioptiontype.php.

References eZStringUtils\explodeStr().

## ◆ hasObjectAttributeContent()

eZMultiOptionType::hasObjectAttributeContent | ( |  | $contentObjectAttribute | ) |

Returns
  `true` if there are more than one multioption in the list.

Reimplemented from eZDataType.

Definition at line 309 of file ezmultioptiontype.php.

## ◆ initializeObjectAttribute()

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

Sets default multioption values.

Reimplemented from eZDataType.

Definition at line 319 of file ezmultioptiontype.php.

## ◆ isIndexable()

eZMultiOptionType::isIndexable | ( |  | ) |

Returns
  true if the datatype can be indexed

Reimplemented from eZDataType.

Definition at line 142 of file ezmultioptiontype.php.

## ◆ metaData()

eZMultiOptionType::metaData | ( |  | $contentObjectAttribute | ) |

Returns
  The internal XML text.

Reimplemented from eZDataType.

Definition at line 150 of file ezmultioptiontype.php.

## ◆ objectAttributeContent()

eZMultiOptionType::objectAttributeContent | ( |  | $contentObjectAttribute | ) |

Returns
  An eZMultiOption object which contains all the option data

Reimplemented from eZDataType.

Definition at line 135 of file ezmultioptiontype.php.

## ◆ productOptionInformation()

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

Finds the option which has the correct ID , if found it returns an option structure.

Parameters

  $optionString | must contain the multioption ID an underscore (_) and a the option ID.

Reimplemented from eZDataType.

Definition at line 281 of file ezmultioptiontype.php.

## ◆ serializeContentClassAttribute()

eZMultiOptionType::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 421 of file ezmultioptiontype.php.

## ◆ serializeContentObjectAttribute()

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

Parameters

  package |
  objectAttribute | content attribute

Returns
  a DOM representation of the content object attribute

Reimplemented from eZDataType.

Definition at line 436 of file ezmultioptiontype.php.

References eZDataType\createContentObjectAttributeDOMNode().

## ◆ storeObjectAttribute()

eZMultiOptionType::storeObjectAttribute | ( |  | $contentObjectAttribute | ) |

This function calles xmlString function to create xml string and then store the content.

Reimplemented from eZDataType.

Definition at line 126 of file ezmultioptiontype.php.

## ◆ title()

eZMultiOptionType::title | ( |  | $objectAttribute,
|  |  | $name = `"name"`
| ) |  |

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

Reimplemented from eZDataType.

Definition at line 300 of file ezmultioptiontype.php.

## ◆ toString()

eZMultiOptionType::toString | ( |  | $objectAttribute | ) |

Returns
  string representation of an contentobjectattribute data for simplified export

Reimplemented from eZDataType.

Definition at line 356 of file ezmultioptiontype.php.

References eZStringUtils\implodeStr().

## ◆ unserializeContentClassAttribute()

eZMultiOptionType::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 430 of file ezmultioptiontype.php.

## ◆ unserializeContentObjectAttribute()

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

Unserialize contentobject attribute

Parameters

  package |
  objectAttribute | contentobject attribute object
  attributeNode | ezdomnode object

Reimplemented from eZDataType.

Definition at line 449 of file ezmultioptiontype.php.

## ◆ validateObjectAttributeHTTPInput()

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

Validates the input for this datatype.

Returns
  True if input is valid.

Reimplemented from eZDataType.

Definition at line 47 of file ezmultioptiontype.php.

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

## Member Data Documentation

## ◆ DATA_TYPE_STRING

const eZMultiOptionType::DATA_TYPE_STRING = "ezmultioption"

Definition at line 35 of file ezmultioptiontype.php.

## ◆ DEFAULT_NAME_VARIABLE

const eZMultiOptionType::DEFAULT_NAME_VARIABLE = "_ezmultioption_default_name_"

Definition at line 34 of file ezmultioptiontype.php.

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

- ezmultioptiontype.php

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