eZPublishCommunityProject(LegacyStack)  2013.9
eZMultiOption2Type Class Reference

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

+ Inheritance diagram for eZMultiOption2Type:
+ Collaboration diagram for eZMultiOption2Type:

Public Member Functions

 batchInitializeObjectAttributeData ($classAttribute)
 
 customObjectAttributeHTTPAction ($http, $action, $contentObjectAttribute, $parameters)
 
 editTemplate ($contentObjectAttribute)
 
 eZMultiOption2Type ()
 
 fetchClassAttributeHTTPInput ($http, $base, $classAttribute)
 
 fetchHTTPInputForGroup ($parentOptionGroup, $http, $base, $contentObjectAttribute, $depth=0)
 
 fetchObjectAttributeHTTPInput ($http, $base, $contentObjectAttribute)
 
 hasObjectAttributeContent ($contentObjectAttribute)
 
 initializeObjectAttribute ($contentObjectAttribute, $currentVersion, $originalContentObjectAttribute)
 
 isAddToBasketValidationRequired ()
 
 isIndexable ()
 
 metaData ($contentObjectAttribute)
 
 objectAttributeContent ($contentObjectAttribute)
 
 productOptionInformation ($objectAttribute, $optionID, $productItem)
 
 serializeContentClassAttribute ($classAttribute, $attributeNode, $attributeParametersNode)
 
 serializeContentObjectAttribute ($package, $objectAttribute)
 
 storeObjectAttribute ($contentObjectAttribute)
 
 supportsBatchInitializeObjectAttribute ()
 
 unserializeContentClassAttribute ($classAttribute, $attributeNode, $attributeParametersNode)
 
 unserializeContentObjectAttribute ($package, $objectAttribute, $attributeNode)
 
 validateAddToBasket ($objectAttribute, $data, &$errors)
 
 validateObjectAttributeHTTPInput ($http, $base, $contentObjectAttribute)
 
- Public Member Functions inherited from eZDataType
 attribute ($attr)
 
 attributes ()
 
 batchInitializeObjectAttributeData ($classAttribute)
 
 classAttributeContent ($classAttribute)
 
 classAttributeRemovableInformation ($classAttribute, $includeAll=true)
 
 classDisplayInformation ($classAttribute, $mergeInfo=false)
 
 cloneClassAttribute ($oldClassAttribute, $newClassAttribute)
 
 contentActionList ($classAttribute)
 Return content action(s) which can be performed on object containing the current datatype. More...
 
 createContentObjectAttributeDOMNode ($objectAttribute)
 Create empty content object attribute DOM node. More...
 
 customClassAttributeHTTPAction ($http, $action, $classAttribute)
 
 customObjectAttributeHTTPAction ($http, $action, $objectAttribute, $parameters)
 
 customSorting ()
 
 customSortingSQL ($params)
 
 deleteStoredClassAttribute ($classAttribute, $version=null)
 
 deleteStoredObjectAttribute ($objectAttribute, $version=null)
 
 diff ($old, $new, $options=false)
 
 editTemplate ($contentobjectAttribute)
 
 eZDataType ($dataTypeString, $name, $properties=array())
 
 fetchActionValue ($action, $actionName, &$value)
 
 fetchClassAttributeHTTPInput ($http, $base, $classAttribute)
 
 fetchCollectionAttributeHTTPInput ($collection, $collectionAttribute, $http, $base, $objectAttribute)
 
 fetchObjectAttributeHTTPInput ($http, $base, $objectAttribute)
 
 fixRelatedObjectItem ($contentObjectAttribute, $objectID, $mode)
 
 fixupClassAttributeHTTPInput ($http, $base, $classAttribute)
 
 fixupCollectionAttributeHTTPInput ($http, $base, $objectAttribute)
 
 fixupObjectAttributeHTTPInput ($http, $base, $objectAttribute)
 
 fromString ($objectAttribute, $string)
 
 getDBAExtensionFilePath ()
 
 getDBAFileName ()
 
 getDBAFilePath ($checkExtensions=true)
 
 handleCustomObjectHTTPActions ($http, $attributeDataBaseName, $customActionAttributeArray, $customActionParameters)
 
 handleDownload ($object, $objectVersion, $objectLanguage, $objectAttribute)
 
 hasAttribute ($attr)
 
 hasInformationCollection ()
 
 hasObjectAttributeContent ($contentObjectAttribute)
 
 hasStoredFileInformation ($object, $objectVersion, $objectLanguage, $objectAttribute)
 
 importDBDataFromDBAFile ($dbaFilePath=false)
 
 informationTemplate ($contentobjectAttribute)
 
 initializeClassAttribute ($classAttribute)
 
 initializeObjectAttribute ($objectAttribute, $currentVersion, $originalContentObjectAttribute)
 
 insertHTTPFile ($object, $objectVersion, $objectLanguage, $objectAttribute, $httpFile, $mimeData, &$result)
 
 insertRegularFile ($object, $objectVersion, $objectLanguage, $objectAttribute, $filePath, &$result)
 
 insertSimpleString ($object, $objectVersion, $objectLanguage, $objectAttribute, $string, &$result)
 
 isA ()
 
 isAddToBasketValidationRequired ()
 
 isClassAttributeRemovable ($classAttribute)
 
 isHTTPFileInsertionSupported ()
 
 isIndexable ()
 
 isInformationCollector ()
 
 isRegularFileInsertionSupported ()
 
 isSimpleStringInsertionSupported ()
 
 isTranslatable ()
 Indicates if datatype supports being translated. More...
 
 metaData ($contentObjectAttribute)
 
 objectAttributeContent ($objectAttribute)
 
 objectDisplayInformation ($objectAttribute, $mergeInfo=false)
 
 onPublish ($contentObjectAttribute, $contentObject, $publishedNodes)
 
 postInitializeObjectAttribute ($objectAttribute, $currentVersion, $originalContentObjectAttribute)
 
 postStore ($objectAttribute)
 
 postUnserializeContentObjectAttribute ($package, $objectAttribute)
 
 preStoreClassAttribute ($classAttribute, $version)
 
 preStoreDefinedClassAttribute ($classAttribute)
 
 preStoreModifiedClassAttribute ($classAttribute)
 
 preStoreVersionedClassAttribute ($classAttribute, $version)
 Hook function which is called before an content class attribute is stored. More...
 
 productOptionInformation ($objectAttribute, $optionID, $productItem)
 
 removeRelatedObjectItem ($contentObjectAttribute, $objectID)
 
 repairContentObjectAttribute ($contentObjectAttribute)
 
 restoreTrashedObjectAttribute ($objectAttribute)
 Restores the content object attribute $objectAttribute from trash Default implementation does nothing. More...
 
 resultTemplate (&$collectionAttribute)
 
 serializeContentClassAttribute ($classAttribute, $attributeNode, $attributeParametersNode)
 
 serializeContentObjectAttribute ($package, $objectAttribute)
 
 sortKey ($objectAttribute)
 
 sortKeyType ()
 
 storeClassAttribute ($classAttribute, $version)
 
 storeDefinedClassAttribute ($classAttribute)
 
 storedFileInformation ($object, $objectVersion, $objectLanguage, $objectAttribute)
 
 storeModifiedClassAttribute ($classAttribute)
 
 storeObjectAttribute ($objectAttribute)
 
 storeVersionedClassAttribute ($classAttribute, $version)
 
 supportsBatchInitializeObjectAttribute ()
 
 templateList ()
 
 title ($objectAttribute, $name=null)
 
 toString ($objectAttribute)
 
 trashStoredObjectAttribute ($objectAttribute, $version=null)
 
 unserializeContentClassAttribute ($classAttribute, $attributeNode, $attributeParametersNode)
 
 unserializeContentObjectAttribute ($package, $objectAttribute, $attributeNode)
 
 validateAddToBasket ($objectAttribute, $data, &$errors)
 
 validateClassAttributeHTTPInput ($http, $base, $classAttribute)
 
 validateCollectionAttributeHTTPInput ($http, $base, $objectAttribute)
 
 validateObjectAttributeHTTPInput ($http, $base, $objectAttribute)
 
 viewTemplate ($contentobjectAttribute)
 

Public Attributes

const DATA_TYPE_STRING = "ezmultioption2"
 
const DEFAULT_NAME_VARIABLE = "_ezmultioption2_default_name_"
 
const MAX_CHILD_LEVEL = 50
 
- Public Attributes inherited from eZDataType
 $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 allowedTypes ()
 
static create ($dataTypeString)
 
static loadAndRegisterAllTypes ()
 
static loadAndRegisterType ($type)
 
static register ($dataTypeString, $className)
 
static registeredDataTypes ()
 

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 eZMultiOption2 class which handles parsing, storing and manipulation of multioption2s and options.

This datatype supports:

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

Member Function Documentation

eZMultiOption2Type::batchInitializeObjectAttributeData (   $classAttribute)
eZMultiOption2Type::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
eZMultiOption2Type::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
eZMultiOption2Type::eZMultiOption2Type ( )

Constructor to initialize the datatype.

eZMultiOption2Type::fetchClassAttributeHTTPInput (   $http,
  $base,
  $classAttribute 
)
eZMultiOption2Type::fetchHTTPInputForGroup (   $parentOptionGroup,
  $http,
  $base,
  $contentObjectAttribute,
  $depth = 0 
)
eZMultiOption2Type::fetchObjectAttributeHTTPInput (   $http,
  $base,
  $contentObjectAttribute 
)

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

eZMultiOption2Type::hasObjectAttributeContent (   $contentObjectAttribute)
Returns
true if there are more than one multioption in the list.
eZMultiOption2Type::initializeObjectAttribute (   $contentObjectAttribute,
  $currentVersion,
  $originalContentObjectAttribute 
)

Sets default multioption values.

eZMultiOption2Type::isAddToBasketValidationRequired ( )
Returns
true if the datatype requires validation during add to basket procedure
eZMultiOption2Type::isIndexable ( )
eZMultiOption2Type::metaData (   $contentObjectAttribute)
Returns
The internal XML text.
eZMultiOption2Type::objectAttributeContent (   $contentObjectAttribute)
Returns
An eZMultiOption2 object which contains all the option data
eZMultiOption2Type::productOptionInformation (   $objectAttribute,
  $optionID,
  $productItem 
)

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

eZMultiOption2Type::serializeContentClassAttribute (   $classAttribute,
  $attributeNode,
  $attributeParametersNode 
)
eZMultiOption2Type::serializeContentObjectAttribute (   $package,
  $objectAttribute 
)
eZMultiOption2Type::storeObjectAttribute (   $contentObjectAttribute)

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

eZMultiOption2Type::supportsBatchInitializeObjectAttribute ( )
eZMultiOption2Type::unserializeContentClassAttribute (   $classAttribute,
  $attributeNode,
  $attributeParametersNode 
)
eZMultiOption2Type::unserializeContentObjectAttribute (   $package,
  $objectAttribute,
  $attributeNode 
)
eZMultiOption2Type::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.

eZMultiOption2Type::validateObjectAttributeHTTPInput (   $http,
  $base,
  $contentObjectAttribute 
)

Validates the input for this datatype.

Returns
True if input is valid.

Member Data Documentation

const eZMultiOption2Type::DATA_TYPE_STRING = "ezmultioption2"
const eZMultiOption2Type::DEFAULT_NAME_VARIABLE = "_ezmultioption2_default_name_"
const eZMultiOption2Type::MAX_CHILD_LEVEL = 50

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