HTML_QuickForm
[ class tree: HTML_QuickForm ] [ index: HTML_QuickForm ] [ all elements ]

Class: HTML_QuickForm_group

Source Location: /HTML_QuickForm-3.2.14/QuickForm/group.php

Class Overview

HTML_Common
   |
   --HTML_QuickForm_element
      |
      --HTML_QuickForm_group

HTML class for a form element group


Author(s):

Version:

  • Release: 3.2.14

Methods


Child classes:

HTML_QuickForm_hierselect
Hierarchical select element
HTML_QuickForm_date
Class for a group of elements used to input dates (and times).

Inherited Variables

Inherited Methods

Class: HTML_QuickForm_element

HTML_QuickForm_element::HTML_QuickForm_element()
Class constructor
HTML_QuickForm_element::accept()
Accepts a renderer
HTML_QuickForm_element::apiVersion()
Returns the current API version
HTML_QuickForm_element::exportValue()
Returns a 'safe' element's value
HTML_QuickForm_element::freeze()
Freeze the element so that only its value is returned
HTML_QuickForm_element::getFrozenHtml()
Returns the value of field without HTML tags
HTML_QuickForm_element::getLabel()
Returns display text for the element
HTML_QuickForm_element::getName()
Returns the element name
HTML_QuickForm_element::getType()
Returns element type
HTML_QuickForm_element::getValue()
Returns the value of the form element
HTML_QuickForm_element::isFrozen()
Returns whether or not the element is frozen
HTML_QuickForm_element::onQuickFormEvent()
Called by HTML_QuickForm whenever form event is made on this element
HTML_QuickForm_element::setLabel()
Sets display text for the element
HTML_QuickForm_element::setName()
Sets the input field name
HTML_QuickForm_element::setPersistantFreeze()
Sets wether an element value should be kept in an hidden field when the element is frozen or not
HTML_QuickForm_element::setValue()
Sets the value of the form element
HTML_QuickForm_element::unfreeze()
Unfreezes the element so that it becomes editable

Class Details

[line 42]
HTML class for a form element group


[ Top ]


Method Detail

HTML_QuickForm_group (Constructor)   [line 104]

void HTML_QuickForm_group( [string $elementName = null], [array $elementLabel = null], [array $elements = null], [mixed $separator = null], [bool $appendName = true])

Class constructor
  • Since: 1.0
  • Access: public

Parameters:

string   $elementName     (optional)Group name
array   $elementLabel     (optional)Group label
array   $elements     (optional)Group elements
mixed   $separator     (optional)Use a string for one separator, use an array to alternate the separators.
bool   $appendName     (optional)whether to change elements' names to the form $groupName[$elementName] or leave them as is.

[ Top ]

accept   [line 434]

void accept( HTML_QuickForm_Renderer &$renderer, [bool $required = false], [string $error = null])

Accepts a renderer
  • Access: public

Overridden in child classes as:

HTML_QuickForm_hierselect::accept()
HTML_QuickForm_date::accept()

Overrides HTML_QuickForm_element::accept() (Accepts a renderer)

Parameters:

HTML_QuickForm_Renderer   &$renderer     renderer object
bool   $required     Whether a group is required
string   $error     An error message associated with a group

[ Top ]

exportValue   [line 470]

void exportValue( &$submitValues, [ $assoc = false])

As usual, to get the group's value we access its elements and call

their exportValue() methods


Overrides HTML_QuickForm_element::exportValue() (Returns a 'safe' element's value)

Parameters:

   &$submitValues     
   $assoc     

[ Top ]

freeze   [line 556]

void freeze( )


Overrides HTML_QuickForm_element::freeze() (Freeze the element so that only its value is returned)
[ Top ]

getElementName   [line 319]

mixed getElementName( mixed $index)

Returns the element name inside the group such as found in the html form
  • Return: string with element name, false if not found
  • Since: 3.0
  • Access: public

Parameters:

mixed   $index     Element name or element index in the group

[ Top ]

getElements   [line 258]

array &getElements( )

Gets the grouped elements
  • Since: 2.4
  • Access: public

[ Top ]

getFrozenHtml   [line 362]

string getFrozenHtml( )

Returns the value of field without HTML tags
  • Since: 1.3
  • Access: public

Overrides HTML_QuickForm_element::getFrozenHtml() (Returns the value of field without HTML tags)
[ Top ]

getGroupType   [line 275]

string getGroupType( )

Gets the group type based on its elements Will return 'mixed' if elements contained in the group are of different types.
  • Return: group elements type
  • Access: public

[ Top ]

getName   [line 145]

string getName( )

Returns the group name
  • Since: 1.0
  • Access: public

Overrides HTML_QuickForm_element::getName() (Returns the element name)
[ Top ]

getValue   [line 195]

mixed getValue( )

Returns the value of the group
  • Since: 1.0
  • Access: public

Overrides HTML_QuickForm_element::getValue() (Returns the value of the form element)
[ Top ]

onQuickFormEvent   [line 393]

void onQuickFormEvent( string $event, mixed $arg, object &$caller)

Called by HTML_QuickForm whenever form event is made on this element
  • Since: 1.0
  • Access: public

Overridden in child classes as:

HTML_QuickForm_hierselect::onQuickFormEvent()
HTML_QuickForm_date::onQuickFormEvent()

Overrides HTML_QuickForm_element::onQuickFormEvent() (Called by HTML_QuickForm whenever form event is made on this element)

Parameters:

string   $event     Name of event
mixed   $arg     event arguments
object   &$caller     calling object

[ Top ]

setElements   [line 240]

void setElements( array $elements)

Sets the grouped elements
  • Since: 1.1
  • Access: public

Parameters:

array   $elements     Array of elements

[ Top ]

setName   [line 130]

void setName( string $name)

Sets the group name
  • Since: 1.0
  • Access: public

Overrides HTML_QuickForm_element::setName() (Sets the input field name)

Parameters:

string   $name     Group name

[ Top ]

setPersistantFreeze   [line 578]

void setPersistantFreeze( [ $persistant = false])


Overrides HTML_QuickForm_element::setPersistantFreeze() (Sets wether an element value should be kept in an hidden field when the element is frozen or not)

Parameters:

   $persistant     

[ Top ]

setValue   [line 161]

void setValue( mixed $value)

Sets values for group's elements
  • Since: 1.0
  • Access: public

Overridden in child classes as:

HTML_QuickForm_hierselect::setValue()
Sets values for group's elements
HTML_QuickForm_date::setValue()

Overrides HTML_QuickForm_element::setValue() (Sets the value of the form element)

Parameters:

mixed   $value     Values for group's elements

[ Top ]

toHtml   [line 299]

string toHtml( )

Returns Html for the group
  • Since: 1.0
  • Access: public

Overridden in child classes as:

HTML_QuickForm_hierselect::toHtml()
HTML_QuickForm_date::toHtml()

[ Top ]

unfreeze   [line 567]

void unfreeze( )


Overrides HTML_QuickForm_element::unfreeze() (Unfreezes the element so that it becomes editable)
[ Top ]


Documentation generated on Thu, 20 Nov 2014 16:00:12 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.