eZ Publish  [trunk]
eZMultiOption2Type Class Reference

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

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

List of all members.

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 Attributes

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

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

Definition at line 32 of file ezmultioption2type.php.


Member Function Documentation

Reimplemented from eZDataType.

Definition at line 664 of file ezmultioption2type.php.

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

Reimplemented from eZDataType.

Definition at line 270 of file ezmultioption2type.php.

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

Reimplemented from eZDataType.

Definition at line 648 of file ezmultioption2type.php.

Constructor to initialize the datatype.

Definition at line 41 of file ezmultioption2type.php.

eZMultiOption2Type::fetchClassAttributeHTTPInput ( http,
base,
classAttribute 
)

Fetches the HTTP input for the content class attribute.

Note:
Default implementation does nothing.

Reimplemented from eZDataType.

Definition at line 525 of file ezmultioption2type.php.

eZMultiOption2Type::fetchHTTPInputForGroup ( parentOptionGroup,
http,
base,
contentObjectAttribute,
depth = 0 
)

Definition at line 139 of file ezmultioption2type.php.

Referenced by fetchObjectAttributeHTTPInput().

eZMultiOption2Type::fetchObjectAttributeHTTPInput ( http,
base,
contentObjectAttribute 
)

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

Reimplemented from eZDataType.

Definition at line 91 of file ezmultioption2type.php.

eZMultiOption2Type::hasObjectAttributeContent ( contentObjectAttribute)
Returns:
true if there are more than one multioption in the list.

Reimplemented from eZDataType.

Definition at line 495 of file ezmultioption2type.php.

eZMultiOption2Type::initializeObjectAttribute ( contentObjectAttribute,
currentVersion,
originalContentObjectAttribute 
)

Sets default multioption values.

Reimplemented from eZDataType.

Definition at line 505 of file ezmultioption2type.php.

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

Reimplemented from eZDataType.

Definition at line 600 of file ezmultioption2type.php.

Returns:
true if the datatype can be indexed

Reimplemented from eZDataType.

Definition at line 75 of file ezmultioption2type.php.

eZMultiOption2Type::metaData ( contentObjectAttribute)
Returns:
The internal XML text.

Reimplemented from eZDataType.

Definition at line 83 of file ezmultioption2type.php.

eZMultiOption2Type::objectAttributeContent ( contentObjectAttribute)
Returns:
An eZMultiOption2 object which contains all the option data

Reimplemented from eZDataType.

Definition at line 68 of file ezmultioption2type.php.

eZMultiOption2Type::productOptionInformation ( objectAttribute,
optionID,
productItem 
)

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

Reimplemented from eZDataType.

Definition at line 476 of file ezmultioption2type.php.

eZMultiOption2Type::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 605 of file ezmultioption2type.php.

eZMultiOption2Type::serializeContentObjectAttribute ( package,
objectAttribute 
)
Parameters:
package
objectAttributecontent attribute
Returns:
a DOM representation of the content object attribute

Reimplemented from eZDataType.

Definition at line 620 of file ezmultioption2type.php.

eZMultiOption2Type::storeObjectAttribute ( contentObjectAttribute)

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

Reimplemented from eZDataType.

Definition at line 59 of file ezmultioption2type.php.

eZMultiOption2Type::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 614 of file ezmultioption2type.php.

eZMultiOption2Type::unserializeContentObjectAttribute ( package,
objectAttribute,
attributeNode 
)

Unserialize contentobject attribute

Parameters:
package
objectAttributecontentobject attribute object
attributeNodeezdomnode object

Reimplemented from eZDataType.

Definition at line 633 of file ezmultioption2type.php.

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.

Reimplemented from eZDataType.

Definition at line 535 of file ezmultioption2type.php.

eZMultiOption2Type::validateObjectAttributeHTTPInput ( http,
base,
contentObjectAttribute 
)

Validates the input for this datatype.

Returns:
True if input is valid.

Reimplemented from eZDataType.

Definition at line 51 of file ezmultioption2type.php.


Member Data Documentation

const eZMultiOption2Type::DATA_TYPE_STRING = "ezmultioption2"

Definition at line 36 of file ezmultioption2type.php.

const eZMultiOption2Type::DEFAULT_NAME_VARIABLE = "_ezmultioption2_default_name_"

Definition at line 34 of file ezmultioption2type.php.

Definition at line 35 of file ezmultioption2type.php.


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