Inheritance diagram for FormControl:Public Member Functions | |
| __construct () | |
| get_form () | |
| checksum () | |
| save ($storage=null) | |
| get ($forvalidation=true) | |
| get_template () | |
| pre_out () | |
| validate () | |
| errors_out ($format, $wrap= '%s') | |
| errors_get ($format, $wrap= '%s') | |
| __get ($name) | |
| __toString () | |
| has_user_options () | |
| __set ($name, $value) | |
| add_validator () | |
| remove_validator ($name) | |
| move_into ($target) | |
| move_before ($target) | |
| move_after ($target) | |
| remove () | |
Public Attributes | |
| $id = null | |
| $class = array( 'formcontrol' ) | |
| $name | |
| $errors = array() | |
Protected Member Functions | |
| get_default () | |
| get_theme ($forvalidation) | |
Protected Attributes | |
| $caption | |
| $default = null | |
| $validators = array() | |
| $storage | |
| $store_user = false | |
| $theme_obj | |
| $container = null | |
| $properties = array() | |
| $template = null | |
| $raw = false | |
A base class from which form controls to be used with FormUI can descend
Definition at line 949 of file formui.php.
| FormControl::__construct | ( | ) |
FormControl constructor - set initial settings of the control
| string | $storage The storage location for this control | |
| string | $default The default value of the control | |
| string | $caption The caption used as the label when displaying a control |
Reimplemented in FormControlNoSave, FormControlTag, FormControlSelect, and FormControlTree.
Definition at line 973 of file formui.php.
| FormControl::__get | ( | $ | name | ) |
Magic function __get returns properties for this object. Potential valid properties: field: A valid unique name for this control in HTML. value: The value of the control, whether the default or submitted in the form
| string | $name The parameter to retrieve |
Reimplemented in FormControlPassword, FormControlCheckboxes, FormControlTree, FormControlCheckbox, and FormControlFile.
Definition at line 1251 of file formui.php.
| FormControl::__set | ( | $ | name, | |
| $ | value | |||
| ) |
Magic property setter for FormControl and its descendants
| string | $name The name of the property | |
| mixed | $value The value to set the property to |
Definition at line 1309 of file formui.php.
| FormControl::add_validator | ( | ) |
Add a validation function to this control Multiple parameters are passed as parameters to the validation function
| mixed | $validator A callback function | |
| mixed | $option... Multiple parameters added to those used to call the validator callback |
Definition at line 1366 of file formui.php.
| FormControl::checksum | ( | ) |
Return a checksum representing this control
Definition at line 1005 of file formui.php.
| FormControl::errors_get | ( | $ | format, | |
| $ | wrap = '%s' | |||
| ) |
Return any validation errors on this control using the supplied format $this->validate must be called first!
string $format A sprintf()-style format string to format the validation error string $format A sprintf()-style format string to wrap the returned error, only if at least one error exists
Definition at line 1230 of file formui.php.
| FormControl::errors_out | ( | $ | format, | |
| $ | wrap = '%s' | |||
| ) |
Output any validation errors on this control using the supplied format $this->validate must be called first!
string $format A sprintf()-style format string to format the validation error string $format A sprintf()-style format string to wrap the returned error, only if at least one error exists
Definition at line 1217 of file formui.php.
| FormControl::get | ( | $ | forvalidation = true |
) |
Return the HTML construction of the control. Abstract function.
| boolean | $forvalidation True if the control should output validation information with the control. |
Reimplemented in FormControlStatic, FormControlTag, FormControlPassword, FormControlSelect, FormControlCheckboxes, FormControlTree, FormControlHidden, FormControlLabel, and FormControlFile.
Definition at line 1130 of file formui.php.
Referenced by get_default().
| FormControl::get_default | ( | ) | [protected] |
Set the default value of this control from options or userinfo if the default value isn't explicitly set on creation
Definition at line 1015 of file formui.php.
Referenced by FormControlPassword::__get().
| FormControl::get_form | ( | ) |
Retrieve the FormUI object that contains this control
Definition at line 991 of file formui.php.
| FormControl::get_template | ( | ) |
Return the template name associated to this control, whether set explicitly or by class
Definition at line 1151 of file formui.php.
Referenced by FormControlSelect::get(), and FormControlPassword::get().
| FormControl::get_theme | ( | $ | forvalidation | ) | [protected] |
Return the theme used to output this control and perform validation if required.
| boolean | $forvalidation If true, process this control for validation (adds validation failure messages to the theme) |
Definition at line 1353 of file formui.php.
Referenced by FormControlSelect::get(), and FormControlPassword::get().
| FormControl::has_user_options | ( | ) |
Returns true if this control should be stored as userinfo
Definition at line 1284 of file formui.php.
| FormControl::move_after | ( | $ | target | ) |
Move this control after the target In the end, this will use FormUI::move()
| object | $target The target control to move this control after |
Definition at line 1424 of file formui.php.
| FormControl::move_before | ( | $ | target | ) |
Move this control before the target In the end, this will use FormUI::move()
| object | $target The target control to move this control before |
Definition at line 1413 of file formui.php.
| FormControl::move_into | ( | $ | target | ) |
Move this control inside of the target In the end, this will use FormUI::move()
| object | $target The target control to move this control before |
Definition at line 1402 of file formui.php.
| FormControl::pre_out | ( | ) |
Return the HTML/script required for this type of control. Abstract function.
Reimplemented in FormControlTextMulti, and FormControlTree.
Definition at line 1176 of file formui.php.
| FormControl::remove | ( | ) |
Remove this controls from the form
Definition at line 1432 of file formui.php.
| FormControl::remove_validator | ( | $ | name | ) |
Removes a validation function from this control
| string | $name The name of the validator to remove |
Definition at line 1385 of file formui.php.
| FormControl::save | ( | $ | storage = null |
) |
Store this control's value under the control's specified key.
| string | $storage (optional) A storage location to store the control data |
Reimplemented in FormControlFile.
Definition at line 1069 of file formui.php.
| FormControl::validate | ( | ) |
Runs any attached validation functions to check validation of this control.
Definition at line 1186 of file formui.php.
1.7.1