eZPublish  4.7
eZMultiOption2 Class Reference

Encapsulates multiple options in one datatype. More...

Public Member Functions

 addChildGroup ($group, $multioptionID=false)
 addMultiOption ($name, $multiOptionPriority, $defaultValue, $multiOptionID)
 addOption ($newID, $OptionID, $optionValue, $optionAdditionalPrice, $isSelectable=1, $objectID=0)
 addOptionForMultioptionID ($multioptionID, $OptionID, $optionValue, $optionAdditionalPrice)
 addOptionToRules ($multioptionID, $optionID)
 attribute ($name)
 attributes ()
 changeMultiOptionId ()
 cleanupRules ()
 createDomElementForGroup ($doc, $groupNode, $depth=0)
 decodeXML ($xmlString)
 eZMultiOption2 ($name, $id=0, $multioptionIDCounter=0, $optionCounter=0, $groupID=0)
 findGroup ($groupID, $depth=0, $groupStack=array())
 findMultiOption ($multioptionID, $depth=0)
 findOption ($multioption, $optionID)
 getGroupIDCounter ()
 getIDsFromMultioptions ($params)
 getMultiOptionIDCounter ()
 getOptionCounter ()
 hasAttribute ($name)
 initCounters ($group)
 initCountersRecursive ()
 initFromXMLCompat ($root, $new=false)
 initGroupFromDom ($root, $new=false)
 removeChildGroup ($groupID, $depth=0)
 removeMultiOptions ($array_remove)
 removeObjectFromOption ($multioptionID, $optionID)
 removeOptions ($arrayRemove, $optionId)
 resetCounters ()
 resetOptionCounter ()
 runFunctionForAllGroups ($func, $params)
 setGroupIDCounter ($groupIDCounter)
 setMultiOptionIDCounter ($multioptionIDCounter)
 setObjectForOption ($multioptionID, $optionID, $objectID)
 setOptionCounter ($optionCounter)
 xmlString ()

Public Attributes

 Contains the multioption counter value. More...
 $MultioptionIDList = array()
 Contains the Option name. More...
 Contains the option counter value. More...
 $OptionIDList = array()
 Contains the Options. More...

Detailed Description

Encapsulates multiple options in one datatype.

Member Function Documentation

eZMultiOption2::addChildGroup (   $group,
  $multioptionID = false 
eZMultiOption2::addMultiOption (   $name,

Adds an Multioption named $name

$namecontains the name of multioption.
$multiOptionPriorityis stored for displaying the array in order.
$defaultValueis stored to display the options by default.
The ID of the multioption that was added.

Referenced by initGroupFromDom().

eZMultiOption2::addOption (   $newID,
  $isSelectable = 1,
  $objectID = 0 

Adds an Option to multioption $name

$newIDis the element key value to which the new option will be added.
$optionValueis the original value to display for users.
$optionAdditionalPriceis a price value that is used to store price of the option values.

Referenced by initGroupFromDom().

eZMultiOption2::addOptionForMultioptionID (   $multioptionID,
eZMultiOption2::addOptionToRules (   $multioptionID,
eZMultiOption2::attribute (   $name)

Returns an attribute. The valid attributes are name and multioption_list name contains the name of multioption multioption_list contains the list of all multioptions.

Referenced by findGroup(), initCounters(), and removeChildGroup().

eZMultiOption2::attributes ( )
list of supported attributes

Referenced by hasAttribute().

eZMultiOption2::changeMultiOptionId ( )

Change the id of multioption in ascending order.

Referenced by initGroupFromDom(), and removeMultiOptions().

eZMultiOption2::cleanupRules ( )
eZMultiOption2::createDomElementForGroup (   $doc,
  $depth = 0 

Referenced by xmlString().

eZMultiOption2::decodeXML (   $xmlString)

Will decode an xml string and initialize the eZ Multi option object. If $xmlString is on empty then it will call addMultiOption() and addOption() functions to create new multioption else it will decode the xml string.

$xmlStringcontain the complete data structure for multioptions.
See Also
eZMultiOption2::eZMultiOption2 (   $name,
  $id = 0,
  $multioptionIDCounter = 0,
  $optionCounter = 0,
  $groupID = 0 

Initializes with empty multioption2 list.

Referenced by decodeXML(), initFromXMLCompat(), and initGroupFromDom().

eZMultiOption2::findGroup (   $groupID,
  $depth = 0,
  $groupStack = array() 
eZMultiOption2::findMultiOption (   $multioptionID,
  $depth = 0 
eZMultiOption2::findOption (   $multioption,
eZMultiOption2::getGroupIDCounter ( )

Referenced by initCounters().

eZMultiOption2::getIDsFromMultioptions (   $params)
eZMultiOption2::getMultiOptionIDCounter ( )

Referenced by initCounters().

eZMultiOption2::getOptionCounter ( )

Referenced by initCounters().

eZMultiOption2::hasAttribute (   $name)

Returns true if object have an attribute. The valid attributes are name and multioption_list.

$namecontains the name of attribute
eZMultiOption2::initCounters (   $group)
eZMultiOption2::initCountersRecursive ( )
eZMultiOption2::initFromXMLCompat (   $root,
  $new = false 

Referenced by decodeXML().

eZMultiOption2::initGroupFromDom (   $root,
  $new = false 

Referenced by decodeXML().

eZMultiOption2::removeChildGroup (   $groupID,
  $depth = 0 
eZMultiOption2::removeMultiOptions (   $array_remove)

Remove MultiOption from the array. After calling this function all the options associated with that multioption will be removed. This function also calles to changeMultiOption to reset the key value of multioption array.

$array_removeis the array of those multiOptions which is selected to remove.
See Also
eZMultiOption2::removeObjectFromOption (   $multioptionID,
eZMultiOption2::removeOptions (   $arrayRemove,

Remove Options from the multioption. This function first remove selected options and then reset the key value if all options for that multioption.

$arrayRemoveis a list of all array elements which is selected to remove from the multioptions.
$optionIdis the key value if multioption from which it is required to remove the options.
See Also
eZMultiOption2::resetCounters ( )
eZMultiOption2::resetOptionCounter ( )

Finds the largest option_id among the options and sets it as $this->OptionCounter

Referenced by resetCounters().

eZMultiOption2::runFunctionForAllGroups (   $func,
eZMultiOption2::setGroupIDCounter (   $groupIDCounter)
eZMultiOption2::setMultiOptionIDCounter (   $multioptionIDCounter)

Referenced by initCounters().

eZMultiOption2::setObjectForOption (   $multioptionID,
eZMultiOption2::setOptionCounter (   $optionCounter)
eZMultiOption2::xmlString ( )

Will return the XML string for this MultiOption set.

See Also

Member Data Documentation


Referenced by attribute().


Referenced by attribute(), and initGroupFromDom().


Contains the multioption counter value.

Referenced by addMultiOption(), getMultiOptionIDCounter(), and initGroupFromDom().

eZMultiOption2::$MultioptionIDList = array()

Contains the Option name.

Referenced by attribute().


Contains the option counter value.

Referenced by addOption(), and getOptionCounter().

eZMultiOption2::$OptionIDList = array()

Contains the Options.

Referenced by attribute().

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