Container
class Container extends Container implements ArrayAccess
Container for form controls.
Properties
callable[] | $onValidate | ||
protected ControlGroup | $currentGroup | ||
ArrayHash | $values | ||
ArrayIterator read-only | $controls | ||
Form read-only | $form |
Methods
Fill-in with default values.
Returns the values submitted by the form.
Is form valid?
Performs the server side validation.
Returns all validation errors.
Returns current group.
Adds the specified component to the IContainer.
Iterates over all form controls.
Adds single-line text input control to the form.
Adds single-line text input control used for sensitive input such as passwords.
Adds multi-line text input control to the form.
Adds control that allows the user to upload files.
Adds control that allows the user to upload multiple files.
Adds hidden form control used to store a non-displayed value.
Adds check box control to the form.
Adds set of radio button controls to the form.
Adds set of checkbox controls to the form.
Adds select box control that allows single item selection.
Adds select box control that allows multiple item selection.
Adds button used to submit form.
Adds graphical button used to submit form.
Adds naming container to the form.
Adds the component to the container.
Returns component specified by name. Throws exception if component doesn't exist.
Does component specified by name exists?
Removes component from the container.
Prevents cloning.
Details
at line 43
Container
setDefaults($values, $erase = FALSE)
Fill-in with default values.
at line 59
Container
setValues($values, $erase = FALSE)
Fill-in with values.
at line 95
ArrayHash|array
getValues($asArray = FALSE)
Returns the values submitted by the form.
at line 117
bool
isValid()
Is form valid?
at line 134
void
validate(array $controls = NULL)
Performs the server side validation.
at line 148
array
getErrors()
Returns all validation errors.
at line 164
Container
setCurrentGroup(ControlGroup $group = NULL)
No description
at line 175
ControlGroup
getCurrentGroup()
Returns current group.
at line 189
Container
addComponent(IComponent $component, $name, $insertBefore = NULL)
Adds the specified component to the IContainer.
at line 203
ArrayIterator
getControls()
Iterates over all form controls.
at line 214
Form
getForm($need = TRUE)
Returns form.
at line 231
TextInput
addText($name, $label = NULL, $cols = NULL, $maxLength = NULL)
Adds single-line text input control to the form.
at line 247
TextInput
addPassword($name, $label = NULL, $cols = NULL, $maxLength = NULL)
Adds single-line text input control used for sensitive input such as passwords.
at line 263
TextArea
addTextArea($name, $label = NULL, $cols = NULL, $rows = NULL)
Adds multi-line text input control to the form.
at line 278
UploadControl
addUpload($name, $label = NULL, $multiple = FALSE)
Adds control that allows the user to upload files.
at line 290
UploadControl
addMultiUpload($name, $label = NULL)
Adds control that allows the user to upload multiple files.
at line 302
HiddenField
addHidden($name, $default = NULL)
Adds hidden form control used to store a non-displayed value.
at line 316
Checkbox
addCheckbox($name, $caption = NULL)
Adds check box control to the form.
at line 329
RadioList
addRadioList($name, $label = NULL, array $items = NULL)
Adds set of radio button controls to the form.
at line 339
CheckboxList
addCheckboxList($name, $label = NULL, array $items = NULL)
Adds set of checkbox controls to the form.
at line 353
SelectBox
addSelect($name, $label = NULL, array $items = NULL, $size = NULL)
Adds select box control that allows single item selection.
at line 371
MultiSelectBox
addMultiSelect($name, $label = NULL, array $items = NULL, $size = NULL)
Adds select box control that allows multiple item selection.
at line 387
SubmitButton
addSubmit($name, $caption = NULL)
Adds button used to submit form.
at line 399
Button
addButton($name, $caption = NULL)
Adds push buttons with no default behavior.
at line 412
ImageButton
addImage($name, $src = NULL, $alt = NULL)
Adds graphical button used to submit form.
at line 423
Container
addContainer($name)
Adds naming container to the form.
at line 440
void
offsetSet($name, $component)
Adds the component to the container.
at line 452
IComponent
offsetGet($name)
Returns component specified by name. Throws exception if component doesn't exist.
at line 463
bool
offsetExists($name)
Does component specified by name exists?
at line 474
void
offsetUnset($name)
Removes component from the container.
at line 486
__clone()
Prevents cloning.