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

Class: HTML_QuickForm2

Source Location: /HTML_QuickForm2-0.1.0/QuickForm2.php

Class Overview

HTML_Common2
   |
   --HTML_QuickForm2_Node
      |
      --HTML_QuickForm2_Container
         |
         --HTML_QuickForm2

Class representing a HTML form


Author(s):

Version:

  • Release: 0.1.0

Variables

Methods


Inherited Variables

Inherited Methods

Class: HTML_QuickForm2_Container

HTML_QuickForm2_Container::addElement()
Appends an element to the container (possibly creating it first)
HTML_QuickForm2_Container::appendChild()
Appends an element to the container
HTML_QuickForm2_Container::arrayMerge()
Merges two arrays
HTML_QuickForm2_Container::count()
Returns the number of elements in the container
HTML_QuickForm2_Container::getElementById()
Returns an element if its id is found
HTML_QuickForm2_Container::getElements()
Returns an array of this container's elements
HTML_QuickForm2_Container::getElementsByName()
Returns an array of elements which name corresponds to element
HTML_QuickForm2_Container::getId()
HTML_QuickForm2_Container::getIterator()
Returns a recursive iterator for the container elements
HTML_QuickForm2_Container::getName()
HTML_QuickForm2_Container::getRecursiveIterator()
Returns a recursive iterator iterator for the container elements
HTML_QuickForm2_Container::getValue()
Returns the element's value
HTML_QuickForm2_Container::insertBefore()
Inserts an element in the container
HTML_QuickForm2_Container::onAttributeChange()
HTML_QuickForm2_Container::persistentFreeze()
HTML_QuickForm2_Container::removeChild()
Removes the element from this container
HTML_QuickForm2_Container::setId()
HTML_QuickForm2_Container::setName()
HTML_QuickForm2_Container::toggleFrozen()
HTML_QuickForm2_Container::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::generateId()
Generates an id for the element
HTML_QuickForm2_Node::getContainer()
Returns the element containing current
HTML_QuickForm2_Node::getDataSources()
Returns the data sources for this element
HTML_QuickForm2_Node::getId()
Returns the element's id
HTML_QuickForm2_Node::getLabel()
Returns the element's label(s)
HTML_QuickForm2_Node::getName()
Returns the element's name
HTML_QuickForm2_Node::getType()
Returns the element's type
HTML_QuickForm2_Node::getValue()
Returns the element's value
HTML_QuickForm2_Node::persistentFreeze()
Changes the element's persistent freeze behaviour
HTML_QuickForm2_Node::setContainer()
Adds the link to the element containing current
HTML_QuickForm2_Node::setId()
Sets the elements 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

Class Details

[line 65]
Class representing a HTML form


[ Top ]


Class Variables

$datasources = array()

[line 71]

Data sources providing values for form elements
  • Access: protected

Type:   array


[ Top ]

$watchedAttributes = array('id', 'method')

[line 77]

We do not allow setting "method" and "id" other than through constructor
  • Access: protected

Type:   array
Overrides:   Array


[ Top ]



Method Detail

__construct (Constructor)   [line 88]

HTML_QuickForm2 __construct( string $id, [string $method = 'post'], [mixed $attributes = null], [bool $trackSubmit = true])

Class constructor, form's "id" and "method" attributes can only be set here
  • Access: public

Overrides HTML_QuickForm2_Node::__construct() (Class constructor)

Parameters:

string   $id   —  "id" attribute of <form> tag
string   $method   —  HTTP method used to submit the form
mixed   $attributes   —  Additional attributes (either a string or an array)
bool   $trackSubmit   —  Whether to track if the form was submitted by adding a special hidden field

[ Top ]

addDataSource   [line 144]

void addDataSource( HTML_QuickForm2_DataSource $datasource)

Adds a new data source to the form
  • Access: public

Parameters:

HTML_QuickForm2_DataSource   $datasource   —  Data source

[ Top ]

getDataSources   [line 178]

array getDataSources( )

Returns the list of data sources attached to the form
  • Access: public

Overrides HTML_QuickForm2_Node::getDataSources() (Returns the data sources for this element)
[ Top ]

getType   [line 183]

void getType( )

  • Access: public

Overrides HTML_QuickForm2_Node::getType() (Returns the element's type)
[ Top ]

onAttributeChange   [line 119]

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

  • Access: protected

Overrides HTML_QuickForm2_Container::onAttributeChange() (parent method not documented)

Parameters:

   $name   — 
   $value   — 

[ Top ]

setContainer   [line 126]

void setContainer( [HTML_QuickForm2_Container $container = null])

  • Access: protected

Overrides HTML_QuickForm2_Node::setContainer() (Adds the link to the element containing current)

Parameters:

HTML_QuickForm2_Container   $container   — 

[ Top ]

setDataSources   [line 157]

void setDataSources( array $datasources)

Replaces the list of form's data sources with a completely new one
  • Throws: HTML_QuickForm2_InvalidArgumentException if given array contains something that is not a valid data source
  • Access: public

Parameters:

array   $datasources   —  A new data source list

[ Top ]

setId   [line 131]

void setId( [ $id = null])

  • Access: public

Overrides HTML_QuickForm2_Container::setId() (parent method not documented)

Parameters:

   $id   — 

[ Top ]

setValue   [line 188]

void setValue( $value)

  • Access: public

Overrides HTML_QuickForm2_Node::setValue() (Sets the element's value)

Parameters:

   $value   — 

[ Top ]

__toString   [line 193]

void __toString( )

  • Access: public

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:00:13 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.