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.4/Page.php

Class Overview

HTML_QuickForm
   |
   --HTML_QuickForm_Page

The class represents a page of a multipage form.


Author(s):

Version:

  • $Revision: 1.3 $

Variables

Methods


Child classes:

The class represents a page of a multipage form.
PageSecondAlpha
The class represents a page of a multipage form.
PageSecondBeta
The class represents a page of a multipage form.
The class represents a page of a multipage form.
SimplePage
The class represents a page of a multipage form.
PageFoo
The class represents a page of a multipage form.
PageBar
The class represents a page of a multipage form.
PageBaz
The class represents a page of a multipage form.
Page_CMS_Layout
The class represents a page of a multipage form.
Page_CMS_Fill
The class represents a page of a multipage form.
Page_CMS_Preview
The class represents a page of a multipage form.
PageSecond
The class represents a page of a multipage form.
Page_Account_Credentials
The class represents a page of a multipage form.
Page_Account_Information
The class represents a page of a multipage form.

Inherited Variables

Inherited Methods


Class Details

[line 35]
The class represents 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.

  • Author: Alexey Borzov <avb@php.net>
  • Version: $Revision: 1.3 $


[ Top ]


Class Variables

$controller =  null

[line 48]

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



[ Top ]



Method Detail

HTML_QuickForm_Page (Constructor)   [line 61]

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

Class constructor
  • Access: public

Parameters:

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

[ Top ]

addAction   [line 74]

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

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

Parameters:

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

[ Top ]

buildForm   [line 141]

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 ]

getButtonName   [line 106]

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 89]

void handle( string $actionName)

Handles an action.

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

  • Access: public

Parameters:

string   $actionName   —  Name of the action

[ Top ]

isFormBuilt   [line 153]

bool isFormBuilt( )

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

[ Top ]

loadValues   [line 120]

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 169]

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 14:10:16 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.