Class WRepeatableComponentCollection

Description

This component allows for the creation of repeatable components or groups of components.

Located in /polyphony/main/library/Wizard/Components/WRepeatableComponentCollection.class.php (line 24)

SObject
   |
   --WizardComponent
      |
      --WizardComponentWithChildren
         |
         --WRepeatableComponentCollection
Direct descendents
Class Description
WAddFromListRepeatableComponentCollection This component allows for the creation of repeatable components or groups of components. Only the newly added comonents are editable. Existing ones can only be removed.
WNewOnlyEditableRepeatableComponentCollection This component allows for the creation of repeatable components or groups of components. Only the newly added comonents are editable. Existing ones can only be removed.
WOrderedRepeatableComponentCollection This component allows for the creation of ordered repeatable components or groups of components.
a wizard representation for style collections
Variable Summary
mixed $_addButton
mixed $_max
mixed $_min
mixed $_num
mixed $_text
Method Summary
WRepeatableComponentCollection WRepeatableComponentCollection ()
ref addValueCollection (ref $collection, [boolean $removable = true])
mixed getAllValues ()
string getMarkup (string $fieldName)
void setAddLabel (string $label)
void setContent (mixed $content, string $content;)
void setElementLayout (string $text)
void setEnabled (boolean $enabled, [boolean $sticky = false])
void setMaximum (integer $max)
void setMiminum (integer $min)
void setRemoveLabel (string $label)
void setStartingNumber (integer $start)
void setValue (ref $collectionArray)
boolean update (string $fieldName)
void usePrefixFunction (string $functionName)
boolean validate ()
void _addElement ([boolean $removable = true])
void _ensureNumber (integer $num)
array _getAllValues (string $key)
void _removeElements (array $ar)
Variables
mixed $_addButton (line 35)
mixed $_collections = array() (line 28)
mixed $_max = -1 (line 30)
mixed $_min = 0 (line 29)
mixed $_num = 1 (line 31)
mixed $_prefixFunction = 0 (line 33)
mixed $_text = '' (line 32)

Inherited Variables

Inherited from WizardComponentWithChildren

WizardComponentWithChildren::$_children

Inherited from WizardComponent

WizardComponent::$_enabled
WizardComponent::$_enabledSticky
WizardComponent::$_parent
Methods
Constructor WRepeatableComponentCollection (line 37)
WRepeatableComponentCollection WRepeatableComponentCollection ()
addValueCollection (line 161)

Adds a collection of WizardComponents indexed by field name to the list of collections.

This is useful when pre-populating the list with old/previous values.

  • return: array An array of the components created with the values passed.
  • access: public
ref addValueCollection (ref $collection, [boolean $removable = true])
  • boolean $removable: Can this collection be removed by the user?
  • ref $collection: array $collection Indexed by field name.

Redefined in descendants as:
getAllValues (line 293)

Returns the values of wizard-components. Should return an array if children are involved, otherwise a whatever type of object is expected.

  • access: public
mixed getAllValues ()

Redefinition of:
WizardComponentWithChildren::getAllValues()
Returns the values of wizard-components. Should return an array if children are involved, otherwise a whatever type of object is expected.

Redefined in descendants as:
getMarkup (line 341)

Returns a block of XHTML-valid code that contains markup for this specific component.

  • access: public
string getMarkup (string $fieldName)
  • string $fieldName: The field name to use when outputting form data or similar parameters/information.

Redefinition of:
WizardComponent::getMarkup()
Returns a block of XHTML-valid code that contains markup for this specific component.

Redefined in descendants as:
setAddLabel (line 70)

Set the label to use on the addButton

  • since: 6/5/06
  • access: public
void setAddLabel (string $label)
  • string $label
setContent (line 149)

Sets this step's content text.

This text will be parsed with Wizard::parseText()

  • access: public
void setContent (mixed $content, string $content;)
  • string $content;
setElementLayout (line 138)

Sets the textual layout of each element in the collection. They will be surrounded by html DIV tags.

  • access: public
void setElementLayout (string $text)
  • string $text
setEnabled (line 53)

Sets if this component will be enabled or disabled.

  • access: public
void setEnabled (boolean $enabled, [boolean $sticky = false])
  • boolean $enabled
  • boolean $sticky: If true, future calls to setEnabled without sticky will have no effect.

Redefinition of:
WizardComponentWithChildren::setEnabled()
Sets if this component will be enabled or disabled.

Redefined in descendants as:
setMaximum (line 118)

Sets the maximum number of elements that we allow in this collection. A value of "-1" is no limit.

  • access: public
void setMaximum (integer $max)
  • integer $max
setMiminum (line 108)

Sets the minimum number of elements that we allow in the collection.

  • access: public
void setMiminum (integer $min)
  • integer $min
setRemoveLabel (line 83)

Set the label to use on the remove button

  • since: 6/5/06
  • access: public
void setRemoveLabel (string $label)
  • string $label
setStartingNumber (line 128)

Sets the number of elements to display as a starting value.

  • access: public
void setStartingNumber (integer $start)
  • integer $start
setValue (line 182)

A wrapper for addValueCollection which adds a ValueCollection for every element in the array passet, to allow for adding values to nested RepeatableComponentCollections.

  • since: 10/27/05
  • access: public
void setValue (ref $collectionArray)
  • ref $collectionArray: array $collectionArray
update (line 262)

Tells the wizard component to update itself - this may include getting form post data or validation - whatever this particular component wants to do every pageload.

  • return: - TRUE if everything is OK
  • access: public
boolean update (string $fieldName)
  • string $fieldName: The field name to use when outputting form data or similar parameters/information.

Redefinition of:
WizardComponentWithChildren::update()
Tells the wizard component to update itself - this may include getting form post data or validation - whatever this particular component wants to do every pageload.

Redefined in descendants as:
usePrefixFunction (line 98)

Sets the Component to prefix each "collection" or value with the return value of this function. The function will be passed: the index of the value (starting from zero) and a hash of the values.

  • access: public
void usePrefixFunction (string $functionName)
  • string $functionName
validate (line 242)

Returns true if this component (and all child components if applicable) have valid values.

By default, this will just return TRUE. Validate should be called usually before a save event is handled, to make sure everything went smoothly.

  • access: public
boolean validate ()

Redefinition of:
WizardComponentWithChildren::validate()
Returns true if this component (and all child components if applicable) have valid values.
_addElement (line 194)

Adds a new element to the end of the list.

  • access: private
void _addElement ([boolean $removable = true])
  • boolean $removable: Can this collection be removed by the user?

Redefined in descendants as:
_ensureNumber (line 323)

Makes sure we have $num collections available.

  • access: public
void _ensureNumber (integer $num)
  • integer $num
_getAllValues (line 308)

Returns the values for the given item.

  • access: public
array _getAllValues (string $key)
  • string $key
_removeElements (line 226)

Removes the elements from our list.

  • access: private
void _removeElements (array $ar)
  • array $ar: An array of element keys.

Redefined in descendants as:

Inherited Methods

Inherited From WizardComponentWithChildren

WizardComponentWithChildren::addComponent()
WizardComponentWithChildren::getAllValues()
WizardComponentWithChildren::getChild()
WizardComponentWithChildren::getChildren()
WizardComponentWithChildren::removeChild()
WizardComponentWithChildren::setEnabled()
WizardComponentWithChildren::update()
WizardComponentWithChildren::validate()

Inherited From WizardComponent

WizardComponent::getAllValues()
WizardComponent::getMarkup()
WizardComponent::getWizard()
WizardComponent::isEnabled()
WizardComponent::setEnabled()
WizardComponent::setParent()
WizardComponent::update()
WizardComponent::validate()

Inherited From SObject

SObject::asA()
SObject::asString()
SObject::copy()
SObject::copySameFrom()
SObject::copyTwoLevel()
SObject::deepCopy()
SObject::isEqual()
SObject::isEqualTo()
SObject::isNotEqualTo()
SObject::isNotReferenceTo()
SObject::isReferenceTo()
SObject::newFrom()
SObject::postCopy()
SObject::printableString()
SObject::shallowCopy()
SObject::_deepCopyArray()

Documentation generated on Wed, 19 Sep 2007 10:28:15 -0400 by phpDocumentor 1.3.0RC3