Base form control for text input.
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.
__construct($name) ¶Create a new base text control.
This constructor must be called from subclass constructors, e.g. AnewtFormControlText, AnewtFormControlTextMultiline, and AnewtFormControlPassword.
$nameThe name of this control.
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.
XHTML element with the minimal HTML markup needed for this control to function properly.
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.
True if valid, false otherwise.
AnewtContainer::_to_array()AnewtContainer::_add()AnewtContainer::delete()AnewtContainer::get()AnewtContainer::_isset()AnewtContainer::_seed()AnewtContainer::setdefault()AnewtContainer::getdefault()AnewtContainer::set()AnewtContainer::__isset()AnewtContainer::__set()AnewtContainer::is_set()AnewtContainer::add()AnewtContainer::_getdefault()AnewtContainer::__unset()AnewtContainer::seed()AnewtContainer::to_array()AnewtContainer::_get()AnewtContainer::__get()AnewtContainer::keys()AnewtContainer::clear()AnewtContainer::_keys()AnewtContainer::_set()AnewtFormControl::$_validator_errorsAnewtFormControl::get_id()AnewtFormControl::add_validator()AnewtFormControl::is_empty()AnewtFormControl::$_validatorsAnewtFormControl::$_formAnewtFormControl::fill()