Inheritance diagram for FormContainer:Public Member Functions | |
| append () | |
| insert () | |
| checksum () | |
| get_values () | |
| get_controls () | |
| get ($forvalidation=true) | |
| get_theme ($forvalidation=false, $control=null) | |
| move ($source, $target, $offset=0) | |
| move_before ($control, $target) | |
| move_after ($control, $target) | |
| move_into ($control, $target) | |
| replace ($target, $control) | |
| remove ($target) | |
| has_user_options () | |
| __get ($name) | |
| __isset ($name) | |
| pre_out () | |
| validate () | |
| save () | |
| set_theme ($theme) | |
| errors_out ($format, $wrap= '%s') | |
| errors_get ($format, $wrap= '%s') | |
Public Attributes | |
| $name = '' | |
| $class = '' | |
| $caption = '' | |
| $controls = array() | |
| $template = 'formcontainer' | |
| $properties = array() | |
Protected Attributes | |
| $theme_obj = null | |
| $checksum | |
FormUI Library - Create interfaces for plugins
FormUI This is the main class, it generates the form itself; FormContainer A form-related class that can contain form elements, derived by FormUI and FormControlFieldset; FormValidators Catalog of validation functions, it can be extended if needed; FormControl Parent class to controls, it contains basic functionalities overrode in each control's class; FormControl* Every control needs a FormControl* class, FormUI literally looks for example, FormControlCheckbox.
Definition at line 17 of file formui.php.
| FormContainer::__get | ( | $ | name | ) |
Magic property getter, returns the specified control
| string | $name The name of the control |
Definition at line 329 of file formui.php.
| FormContainer::__isset | ( | $ | name | ) |
Magic property isset, returns if the specified control exists
| string | $name The name of the control |
Definition at line 350 of file formui.php.
| FormContainer::append | ( | ) |
Append a control to the end of this container
| string | $name The name of the control | |
| string | $type A classname, or the postfix of a class starting 'FormControl' that will be used to create the control |
Definition at line 40 of file formui.php.
| FormContainer::checksum | ( | ) |
Generate a hash for this container
Definition at line 93 of file formui.php.
Referenced by FormUI::salted_name().
| FormContainer::errors_get | ( | $ | format, | |
| $ | wrap = '%s' | |||
| ) |
Return any validation errors on any controls in this container 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 438 of file formui.php.
Referenced by errors_out().
| FormContainer::errors_out | ( | $ | format, | |
| $ | wrap = '%s' | |||
| ) |
Output any validation errors on any controls in this container 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 425 of file formui.php.
| FormContainer::get | ( | $ | forvalidation = true |
) |
Produce HTML output for all this fieldset and all contained controls
| boolean | $forvalidation True if this control should render error information based on validation. |
Reimplemented in FormControlTabs.
Definition at line 155 of file formui.php.
| FormContainer::get_controls | ( | ) |
Returns an associative array of controls
Definition at line 135 of file formui.php.
Referenced by errors_get().
| FormContainer::get_theme | ( | $ | forvalidation = false, |
|
| $ | control = null | |||
| ) |
Retreive the Theme used to display the form component
| boolean | $forvalidation If true, perform validation on control and add error messages to output | |
| FormControl | $control The control to output using a template |
Definition at line 179 of file formui.php.
Referenced by FormUI::get(), get(), and FormUI::output_controls().
| FormContainer::get_values | ( | ) |
Returns an associative array of the controls' values
Definition at line 116 of file formui.php.
| FormContainer::has_user_options | ( | ) |
Returns true if any of the controls this container contains should be stored in userinfo
Definition at line 313 of file formui.php.
Referenced by FormUI::save().
| FormContainer::insert | ( | ) |
Insert a control into the container
| string | The name of the control to insert the new control in front of | |
| string | The type of the new control | |
| string | The name of the new control |
Definition at line 75 of file formui.php.
| FormContainer::move | ( | $ | source, | |
| $ | target, | |||
| $ | offset = 0 | |||
| ) |
Moves a control to target's position to which we add $int if specified That integer is useful to move before or move after the target
| FormControl | $control FormControl object to move | |
| FormControl | $target FormControl object acting as destination | |
| int | $int Integer added to $target's position (index) |
Definition at line 220 of file formui.php.
Referenced by move_after(), and move_before().
| FormContainer::move_after | ( | $ | control, | |
| $ | target | |||
| ) |
Moves a control after the target control
| FormControl | $control FormControl object to move | |
| FormControl | $target FormControl object acting as destination |
Definition at line 258 of file formui.php.
Referenced by replace().
| FormContainer::move_before | ( | $ | control, | |
| $ | target | |||
| ) |
Moves a control before the target control
| FormControl | $control FormControl object to move | |
| FormControl | $target FormControl object acting as destination |
Definition at line 247 of file formui.php.
Referenced by insert().
| FormContainer::move_into | ( | $ | control, | |
| $ | target | |||
| ) |
Move a control into the container
| FormControl | $control FormControl object to move | |
| FormControl | $target FormControl object acting as destination |
Definition at line 269 of file formui.php.
| FormContainer::pre_out | ( | ) |
Return the HTML/script required for all contained controls. Do it only once.
Definition at line 371 of file formui.php.
| FormContainer::remove | ( | $ | target | ) |
Removes a target control from this group (can be the form or a fieldset)
| FormControl | $target FormControl to remove |
Definition at line 302 of file formui.php.
| FormContainer::replace | ( | $ | target, | |
| $ | control | |||
| ) |
Replaces a target control by the supplied control
| FormControl | $target FormControl object to replace | |
| FormControl | $control FormControl object to replace $target with |
Definition at line 291 of file formui.php.
| FormContainer::save | ( | ) |
Store each contained control's value under the control's specified key.
| string | $key (optional) The Options table key to store this option in |
Reimplemented in FormUI.
Definition at line 401 of file formui.php.
| FormContainer::set_theme | ( | $ | theme | ) |
Explicitly assign the theme object to be used with this container
| Theme | $theme The theme object to use to output this container |
Definition at line 413 of file formui.php.
| FormContainer::validate | ( | ) |
Runs any attached validation functions to check validation of each control contained in this fieldset.
Reimplemented in FormUI.
Definition at line 385 of file formui.php.
1.7.1