Axiom (v1.2.0)

A lightweight PHP framework
axFormHelper Class Reference

HTML Form Helper Class. More...

+ Inheritance diagram for axFormHelper:

Public Member Functions

 __construct ($url= '', $method= 'post', $enctype=null)
 Constructor.
 addLine ($name, $display_name=null, $type="text", $value="", $class="")
 Add a form-line to the form.
 getLine ($name)
 Get a given line attached to the form helper.
 setErrors (array $names)
 addFieldset ($legend="")
 Add a fieldset to the form.
 autoFill ($desc)
 Fill the form inner inputs and fieldsets automatically with a descriptor.

Static Public Member Functions

static export ($url= '', $method= 'post', $enctype=null)
 Constructor static alias.

Protected Attributes

 $_form_lines = array()
 An associative map of the lines added to the form.
 $_form_fieldsets = array()
 A list of fieldsets added to the form.

Detailed Description

HTML Form Helper Class.

Todo:
axFormHelper long description
Author:
Delespierre
License:
http://www.gnu.org/licenses/lgpl.html Lesser General Public Licence version 3

Definition at line 17 of file axFormHelper.class.php.


Constructor & Destructor Documentation

axFormHelper::__construct ( url = '',
method = 'post',
enctype = null 
)

Constructor.

Parameters:
string$url[optional] [default ''] Form url attribute
string$method[optional] [default 'post'] Form method attribute
string$enctype[optional] [default null] Form enctyppe attribute

Reimplemented from axBaseHelper.

Definition at line 38 of file axFormHelper.class.php.


Member Function Documentation

axFormHelper::addFieldset ( legend = "")

Add a fieldset to the form.

See also:
axFieldsetHelper::__construct()
Parameters:
strign$legend[optional] [default ""]
Returns:
axFieldsetHelper

Definition at line 100 of file axFormHelper.class.php.

axFormHelper::addLine ( name,
display_name = null,
type = "text",
value = "",
class = "" 
)

Add a form-line to the form.

See also:
axFormLineHelper::export()
Parameters:
string$nameThe line's name
string$display_name[optional] [default null] The display name
string$type[optional] [default "text"] The form line's type
scalar$value[optional] [default ""] The input's value
string$class[optional] [default ""] The CSS class
Returns:
axFormHelper

Definition at line 55 of file axFormHelper.class.php.

Fill the form inner inputs and fieldsets automatically with a descriptor.

The $desc parameter can be either an array or a axModel instance.

Parameters:
mixed$desc
Returns:
axFormHelper

Definition at line 112 of file axFormHelper.class.php.

static axFormHelper::export ( url = '',
method = 'post',
enctype = null 
) [static]

Constructor static alias.

Constructor.

Parameters:
string$url[optional] [default ''] Form url attribute
string$method[optional] [default 'post'] Form method attribute
string$enctype[optional] [default null] Form enctyppe attribute
Returns:
axFormHelper

Definition at line 149 of file axFormHelper.class.php.

axFormHelper::getLine ( name)

Get a given line attached to the form helper.

Parameters:
string$name
Returns:
axFormLineHelper

Definition at line 66 of file axFormHelper.class.php.

axFormHelper::setErrors ( array $  names)

Mark the given lines as error (adding the CSS error class)

Parameters:
array$names
Returns:
axFormHelper

Definition at line 76 of file axFormHelper.class.php.


Field Documentation

array axFormHelper::$_form_fieldsets = array() [protected]

A list of fieldsets added to the form.

Definition at line 29 of file axFormHelper.class.php.

array axFormHelper::$_form_lines = array() [protected]

An associative map of the lines added to the form.

Definition at line 23 of file axFormHelper.class.php.


The documentation for this class was generated from the following file:
 All Data Structures Files Functions Variables