AnewtFormControlTextBase Class Reference

Base form control for text input. More...

List of all members.

Public Member Functions

 __construct ($name)
 Create a new base text control.
 build_widget ()
 Render the minimal HTML needed for this control to work.
Validation methods
 is_valid ()
 Check whether this form control is valid.


Detailed Description

Base form control for text input.

This control supports both single line and multiline input and renderers a HTML input or textarea widget.

Do not instantiate this class, use one of its descendants instead.

Definition at line 21 of file form/controls/text.lib.php.


Constructor & Destructor Documentation

AnewtFormControlTextBase::__construct ( name  ) 

Create a new base text control.

This constructor must be called from subclass constructors, e.g. AnewtFormControlText, AnewtFormControlTextMultiline, and AnewtFormControlPassword.

Parameters:
$name The name of this control.

Reimplemented from AnewtFormControl.

Reimplemented in AnewtFormControlText, AnewtFormControlPassword, and AnewtFormControlTextMultiline.

Definition at line 33 of file form/controls/text.lib.php.


Member Function Documentation

AnewtFormControlTextBase::build_widget (  ) 

Render the minimal HTML needed for this control to work.

Form control implementations should implement this method, e.g. for a checkbox a simple input HTML element should be returned.

Returns:
XHTML element with the minimal HTML markup needed for this control to function properly.

Reimplemented from AnewtFormControl.

Definition at line 48 of file form/controls/text.lib.php.

AnewtFormControlTextBase::is_valid (  ) 

Check whether this form control is valid.

The default is to apply all validators added to this control. Subclasses could also override this method to do something more sensible than applying validators, since some controls don't accept validators, e.g. checkboxes.

Returns:
True if valid, false otherwise.

Reimplemented from AnewtFormControl.

Definition at line 171 of file form/controls/text.lib.php.


The documentation for this class was generated from the following file:

Generated on Sun Aug 2 22:54:37 2009 for Anewt by  doxygen 1.5.9