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

Class: HTML_QuickForm2_Element

Source Location: /HTML_QuickForm2-2.1.0/HTML/QuickForm2/Element.php

Class Overview

HTML_Common2
   |
   --HTML_QuickForm2_Node
      |
      --HTML_QuickForm2_Element

Abstract base class for simple QuickForm2 elements (not Containers)


Author(s):

Version:

  • Release: 2.1.0

Methods


Child classes:

HTML_QuickForm2_Element_Static
Class for static elements that only contain text or markup
HTML_QuickForm2_Element_Textarea
Class for <textarea> elements
HTML_QuickForm2_Element_Select
Class representing a <select> element
HTML_QuickForm2_Element_Input
Base class for <input> elements
HTML_QuickForm2_Element_Button
Class for <button> elements

Inherited Variables

Inherited Methods

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 38]
Abstract base class for simple QuickForm2 elements (not Containers)


[ Top ]


Method Detail

applyFilters   [line 125]

mixed applyFilters( mixed $value)

Applies recursive and non-recursive filters on element value
  • Return: Filtered value
  • Access: protected

Overrides HTML_QuickForm2_Node::applyFilters() (Applies non-recursive filters on element value)

Parameters:

mixed   $value   —  Element value

[ Top ]

getJavascriptTriggers   [line 113]

void getJavascriptTriggers( )

  • Access: public

Overridden in child classes as:

HTML_QuickForm2_Element_Static::getJavascriptTriggers()
HTML_QuickForm2_Element_DualSelect::getJavascriptTriggers()

Overrides HTML_QuickForm2_Node::getJavascriptTriggers() (Returns IDs of form fields that should trigger "live" Javascript validation)
[ Top ]

getJavascriptValue   [line 108]

string getJavascriptValue( [bool $inContainer = false])

Returns Javascript code for getting the element's value
  • Access: public

Overridden in child classes as:

HTML_QuickForm2_Element_Static::getJavascriptValue()
HTML_QuickForm2_Element_DualSelect::getJavascriptValue()
Returns Javascript code for getting the element's value

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

Parameters:

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

[ Top ]

getPersistentContent   [line 55]

string getPersistentContent( )

Generates hidden form field containing the element's value

This is used to pass the frozen element's value if 'persistent freeze' feature is on

  • Access: protected

[ Top ]

render   [line 93]

HTML_QuickForm2_Renderer render( HTML_QuickForm2_Renderer $renderer)

Renders the element using the given renderer
  • Access: public

Overridden in child classes as:

HTML_QuickForm2_Element_Script::render()
Renders the element as the "hidden" one
HTML_QuickForm2_Element_DualSelect::render()
HTML_QuickForm2_Element_InputHidden::render()
HTML_QuickForm2_Controller_DefaultAction::render()
This element is rendered using renderHidden() method

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

Parameters:

HTML_QuickForm2_Renderer   $renderer   — 

[ Top ]

setName   [line 40]

void setName( $name)

  • Access: public

Overridden in child classes as:

HTML_QuickForm2_Element_Static::setName()
Sets the element's name

Overrides HTML_QuickForm2_Node::setName() (Sets the element's name)

Parameters:

   $name   — 

[ Top ]

updateValue   [line 73]

void updateValue( )

Called when the element needs to update its value from form's data sources

The default behaviour is to go through the complete list of the data sources until the non-null value is found.

  • Access: protected

Overridden in child classes as:

HTML_QuickForm2_Element_Static::updateValue()
Called when the element needs to update its value from form's data sources
HTML_QuickForm2_Element_Select::updateValue()
HTML_QuickForm2_Element_InputSubmit::updateValue()
HTML_QuickForm2_Element_InputFile::updateValue()
HTML_QuickForm2_Element_InputCheckbox::updateValue()
HTML_QuickForm2_Element_InputImage::updateValue()
HTML_QuickForm2_Element_Button::updateValue()

Overrides HTML_QuickForm2_Node::updateValue() (Called when the element needs to update its value from form's data sources)
[ Top ]


Documentation generated on Wed, 10 Apr 2019 08:56:09 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.