eZPublish(LegacyStack)  5.1
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

 $ChildGroupList
 
 $GroupID
 
 $GroupIDCounter
 
 $MultiOptionIDCounter
 Contains the multioption counter value. More...
 
 $MultioptionIDList = array()
 
 $Name
 Contains the Option name. More...
 
 $OptionCounter
 Contains the option counter value. More...
 
 $OptionIDList = array()
 
 $Options
 Contains the Options. More...
 

Detailed Description

Encapsulates multiple options in one datatype.

Member Function Documentation

eZMultiOption2::addChildGroup (   $group,
  $multioptionID = false 
)
eZMultiOption2::addMultiOption (   $name,
  $multiOptionPriority,
  $defaultValue,
  $multiOptionID 
)

Adds an Multioption named $name

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

Referenced by initGroupFromDom().

eZMultiOption2::addOption (   $newID,
  $OptionID,
  $optionValue,
  $optionAdditionalPrice,
  $isSelectable = 1,
  $objectID = 0 
)

Adds an Option to multioption $name

Parameters
$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,
  $OptionID,
  $optionValue,
  $optionAdditionalPrice 
)
eZMultiOption2::addOptionToRules (   $multioptionID,
  $optionID 
)
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 ( )
Returns
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,
  $groupNode,
  $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.

Parameters
$xmlStringcontain the complete data structure for multioptions.
See Also
xmlString()
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,
  $optionID 
)
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.

Parameters
$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.

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

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

Parameters
$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
removeMultiOptions()
eZMultiOption2::resetCounters ( )
eZMultiOption2::resetOptionCounter ( )

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

Referenced by resetCounters().

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

Referenced by initCounters().

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

Will return the XML string for this MultiOption set.

See Also
decodeXML()

Member Data Documentation

eZMultiOption2::$ChildGroupList

Referenced by attribute().

eZMultiOption2::$GroupID

Referenced by attribute(), and initGroupFromDom().

eZMultiOption2::$GroupIDCounter
eZMultiOption2::$MultiOptionIDCounter

Contains the multioption counter value.

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

eZMultiOption2::$MultioptionIDList = array()
eZMultiOption2::$Name

Contains the Option name.

Referenced by attribute().

eZMultiOption2::$OptionCounter

Contains the option counter value.

Referenced by addOption(), and getOptionCounter().

eZMultiOption2::$OptionIDList = array()
eZMultiOption2::$Options

Contains the Options.

Referenced by attribute().


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