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

Class: HTML_QuickForm2_Element_DualSelect

Source Location: /HTML_QuickForm2-2.0.0/docs/examples/dualselect.php

Class Overview

HTML_Common2
   |
   --HTML_QuickForm2_Node
      |
      --HTML_QuickForm2_Element
         |
         --HTML_QuickForm2_Element_Select
            |
            --HTML_QuickForm2_Element_DualSelect

"Dualselect" element


Author(s):

Version:

  • Release: 2.0.0

Variables

Methods


Inherited Variables

Inherited Methods

Class: HTML_QuickForm2_Element_Select

HTML_QuickForm2_Element_Select::__construct()
Class constructor
HTML_QuickForm2_Element_Select::addOptgroup()
Adds a new optgroup
HTML_QuickForm2_Element_Select::addOption()
Adds a new option
HTML_QuickForm2_Element_Select::getFrozenHtml()
HTML_QuickForm2_Element_Select::getRawValue()
Returns the value of the <select> element
HTML_QuickForm2_Element_Select::getType()
HTML_QuickForm2_Element_Select::loadOptions()
Loads <option>s (and <optgroup>s) for select element
HTML_QuickForm2_Element_Select::loadOptionsFromArray()
Adds options from given array into given container
HTML_QuickForm2_Element_Select::setValue()
HTML_QuickForm2_Element_Select::updateValue()
HTML_QuickForm2_Element_Select::__toString()

Class: HTML_QuickForm2_Element

HTML_QuickForm2_Element::applyFilters()
Applies recursive and non-recursive filters on element value
HTML_QuickForm2_Element::getJavascriptTriggers()
HTML_QuickForm2_Element::getJavascriptValue()
Returns Javascript code for getting the element's value
HTML_QuickForm2_Element::getPersistentContent()
Generates hidden form field containing the element's value
HTML_QuickForm2_Element::render()
Renders the element using the given renderer
HTML_QuickForm2_Element::setName()
HTML_QuickForm2_Element::updateValue()
Called when the element needs to update its value from form's data sources

Class: HTML_QuickForm2_Node

HTML_QuickForm2_Node::__construct()
Class constructor
HTML_QuickForm2_Node::addFilter()
Adds a filter
HTML_QuickForm2_Node::addRecursiveFilter()
Adds a recursive filter
HTML_QuickForm2_Node::addRule()
Adds a validation rule
HTML_QuickForm2_Node::applyFilter()
Helper function for applying filter callback to a value
HTML_QuickForm2_Node::applyFilters()
Applies non-recursive filters on element value
HTML_QuickForm2_Node::createRule()
Creates a validation rule
HTML_QuickForm2_Node::generateId()
Generates an id for the element
HTML_QuickForm2_Node::getContainer()
Returns the element containing current
HTML_QuickForm2_Node::getData()
Returns the element options
HTML_QuickForm2_Node::getDataSources()
Returns the data sources for this element
HTML_QuickForm2_Node::getError()
Returns the error message for the element
HTML_QuickForm2_Node::getId()
Returns the element's id
HTML_QuickForm2_Node::getJavascriptTriggers()
Returns IDs of form fields that should trigger "live" Javascript validation
HTML_QuickForm2_Node::getJavascriptValue()
Returns Javascript code for getting the element's value
HTML_QuickForm2_Node::getLabel()
Returns the element's label(s)
HTML_QuickForm2_Node::getName()
Returns the element's name
HTML_QuickForm2_Node::getRawValue()
Returns the element's value without filters applied
HTML_QuickForm2_Node::getType()
Returns the element's type
HTML_QuickForm2_Node::getValue()
Returns the element's value, possibly with filters applied
HTML_QuickForm2_Node::isRequired()
Checks whether an element is required
HTML_QuickForm2_Node::onAttributeChange()
Intercepts setting 'name' and 'id' attributes
HTML_QuickForm2_Node::persistentFreeze()
Changes the element's persistent freeze behaviour
HTML_QuickForm2_Node::removeRule()
Removes a validation rule
HTML_QuickForm2_Node::render()
Renders the element using the given renderer
HTML_QuickForm2_Node::renderClientRules()
Adds element's client-side validation rules to a builder object
HTML_QuickForm2_Node::setContainer()
Adds the link to the element containing current
HTML_QuickForm2_Node::setError()
Sets the error message to the element
HTML_QuickForm2_Node::setId()
Sets the element's id
HTML_QuickForm2_Node::setLabel()
Sets the element's label(s)
HTML_QuickForm2_Node::setName()
Sets the element's name
HTML_QuickForm2_Node::setValue()
Sets the element's value
HTML_QuickForm2_Node::storeId()
Stores the explicitly given id to prevent duplicate id generation
HTML_QuickForm2_Node::toggleFrozen()
Changes the element's frozen status
HTML_QuickForm2_Node::updateValue()
Called when the element needs to update its value from form's data sources
HTML_QuickForm2_Node::validate()
Performs the server-side validation

Class Details

[line 27]
"Dualselect" element

This element can be used instead of a normal multiple select. It renders as two multiple selects and two buttons for moving options between them. The values that end up in the "to" select are considered selected.



[ Top ]


Class Variables

$attributes = array('multiple' => 'multiple')

[line 29]

  • Access: protected

Type:   mixed


[ Top ]

$watchedAttributes = array('id', 'name', 'multiple')

[line 31]

  • Access: protected

Type:   mixed
Overrides:   Array


[ Top ]



Method Detail

getJavascriptTriggers   [line 154]

void getJavascriptTriggers( )

  • Access: public

Overrides HTML_QuickForm2_Element::getJavascriptTriggers() (parent method not documented)
[ Top ]

getJavascriptValue   [line 145]

string getJavascriptValue( [bool $inContainer = false])

Returns Javascript code for getting the element's value

All options in "to" select are considered dualselect's values, we need to use an implementation different from that for a standard select-multiple. When returning a parameter for getContainerValue() we should also provide the element's name.

  • Access: public

Overrides HTML_QuickForm2_Element::getJavascriptValue() (Returns Javascript code for getting the element's value)

Parameters:

bool   $inContainer     Whether it should return a parameter for qf.form.getContainerValue()

[ Top ]

onAttributeChange   [line 33]

void onAttributeChange( $name, [ $value = null])

  • Access: protected

Overrides HTML_QuickForm2_Node::onAttributeChange() (Intercepts setting 'name' and 'id' attributes)

Parameters:

   $name     
   $value     

[ Top ]

render   [line 66]

void render( HTML_QuickForm2_Renderer $renderer)

  • Access: public

Overrides HTML_QuickForm2_Element::render() (Renders the element using the given renderer)

Parameters:

HTML_QuickForm2_Renderer   $renderer     

[ Top ]

toArray   [line 88]

void toArray( )

  • Access: public

[ Top ]

__toString   [line 43]

void __toString( )

  • Access: public

Overrides HTML_QuickForm2_Element_Select::__toString() (parent method not documented)
[ Top ]


Documentation generated on Tue, 26 Jun 2012 15:30:15 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.