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

Class: HTML_QuickForm_Page

Source Location: /HTML_QuickForm_Controller-1.0.10/Page.php

Class Overview

HTML_QuickForm
   |
   --HTML_QuickForm_Page

Class representing a page of a multipage form.


Author(s):

Version:

  • Release: 1.0.10

Variables

Methods


Child classes:

Class representing a page of a multipage form.
PageSecondAlpha
Class representing a page of a multipage form.
PageSecondBeta
Class representing a page of a multipage form.
Class representing a page of a multipage form.
SimplePage
Class representing a page of a multipage form.
TabbedPage
Class representing a page of a multipage form.
Page_CMS_Layout
Class representing a page of a multipage form.
Page_CMS_Fill
Class representing a page of a multipage form.
Page_CMS_Preview
Class representing a page of a multipage form.
PageSecond
Class representing a page of a multipage form.
Page_Account_Credentials
Class representing a page of a multipage form.
Page_Account_Information
Class representing a page of a multipage form.

Inherited Variables

Inherited Methods


Class Details

[line 43]
Class representing a page of a multipage form.

Generally you'll need to subclass this and define your buildForm() method that will build the form. While it is also possible to instantiate this class and build the form manually, this is not the recommended way.



[ Top ]


Class Variables

$controller =  null

[line 56]

Contains a reference to a Controller object containing this page
  • Access: public



[ Top ]



Method Detail

HTML_QuickForm_Page (Constructor)   [line 69]

HTML_QuickForm_Page HTML_QuickForm_Page( $formName, [ $method = 'post'], [ $target = ''], [ $attributes = null])

Class constructor
  • Access: public

Parameters:

   $formName   — 
   $method   — 
   $target   — 
   $attributes   — 

[ Top ]

addAction   [line 82]

void addAction( string $actionName, HTML_QuickForm_Action &$action)

Registers a handler for a specific action.
  • Access: public

Parameters:

string   $actionName   —  name of the action
HTML_QuickForm_Action   &$action   —  the handler for the action

[ Top ]

buildForm   [line 151]

void buildForm( )

Builds a form.

You should override this method when you subclass HTML_QuickForm_Page, it should contain all the necessary addElement(), applyFilter(), addRule() and possibly setDefaults() and setConstants() calls. The method will be called on demand, so please be sure to set $_formBuilt property to true to assure that the method works only once.

  • Abstract:
  • Access: public

Overridden in child classes as:

PageFirst::buildForm()
PageSecondAlpha::buildForm()
PageSecondBeta::buildForm()
PageThird::buildForm()
SimplePage::buildForm()
PageFoo::buildForm()
PageBar::buildForm()
PageBaz::buildForm()
Page_CMS_Layout::buildForm()
Page_CMS_Fill::buildForm()
Page_CMS_Preview::buildForm()
PageSecond::buildForm()
Page_Account_Credentials::buildForm()
Page_Account_Information::buildForm()

[ Top ]

exportValues   [line 196]

void exportValues( [mixed $elementList = null], [bool $filterInternal = false])

Returns 'safe' elements' values

Parameters:

mixed   $elementList   —  Array/string of element names, whose values we want. If not set then return all elements.
bool   $filterInternal   —  Whether to remove internal (_qf_...) values from the resultant array

[ Top ]

getButtonName   [line 115]

string getButtonName( string $actionName)

Returns a name for a submit button that will invoke a specific action.
  • Return: "name" attribute for a submit button
  • Access: public

Parameters:

string   $actionName   —  Name of the action

[ Top ]

handle   [line 98]

void handle( string $actionName)

Handles an action.

If an Action object was not registered here, controller's handle() method will be called.

  • Throws: PEAR_Error
  • Access: public

Parameters:

string   $actionName   —  Name of the action

[ Top ]

isFormBuilt   [line 163]

bool isFormBuilt( )

Checks whether the form was already built.
  • Access: public

[ Top ]

loadValues   [line 129]

void loadValues( array $values)

Loads the submit values from the array.

The method is NOT intended for general usage.

  • Access: public

Parameters:

array   $values   —  'submit' values

[ Top ]

setDefaultAction   [line 179]

void setDefaultAction( string $actionName)

Sets the default action invoked on page-form submit

This is necessary as the user may just press Enter instead of clicking one of the named submit buttons and then no action name will be passed to the script.

  • Access: public

Parameters:

string   $actionName   —  default action name

[ Top ]


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