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 41
Container
setDefaults($values, $erase = FALSE)
Fill-in with default values.
at line 58
Container
setValues($values, $erase = FALSE)
internal |
Fill-in with values.
at line 94
ArrayHash|array
getValues($asArray = FALSE)
Returns the values submitted by the form.
at line 116
bool
isValid()
Is form valid?
at line 133
void
validate(array $controls = NULL)
Performs the server side validation.
at line 158
array
getErrors()
Returns all validation errors.
at line 174
Container
setCurrentGroup(ControlGroup $group = NULL)
No description
at line 185
ControlGroup
getCurrentGroup()
Returns current group.
at line 199
Container
addComponent(IComponent $component, $name, $insertBefore = NULL)
Adds the specified component to the IContainer.
at line 213
ArrayIterator
getControls()
Iterates over all form controls.
at line 224
Form
getForm($need = TRUE)
Returns form.
at line 241
TextInput
addText($name, $label = NULL, $cols = NULL, $maxLength = NULL)
Adds single-line text input control to the form.
at line 257
TextInput
addPassword($name, $label = NULL, $cols = NULL, $maxLength = NULL)
Adds single-line text input control used for sensitive input such as passwords.
at line 273
TextArea
addTextArea($name, $label = NULL, $cols = NULL, $rows = NULL)
Adds multi-line text input control to the form.
at line 288
UploadControl
addUpload($name, $label = NULL, $multiple = FALSE)
Adds control that allows the user to upload files.
at line 300
UploadControl
addMultiUpload($name, $label = NULL)
Adds control that allows the user to upload multiple files.
at line 312
HiddenField
addHidden($name, $default = NULL)
Adds hidden form control used to store a non-displayed value.
at line 326
Checkbox
addCheckbox($name, $caption = NULL)
Adds check box control to the form.
at line 339
RadioList
addRadioList($name, $label = NULL, array $items = NULL)
Adds set of radio button controls to the form.
at line 349
CheckboxList
addCheckboxList($name, $label = NULL, array $items = NULL)
Adds set of checkbox controls to the form.
at line 363
SelectBox
addSelect($name, $label = NULL, array $items = NULL, $size = NULL)
Adds select box control that allows single item selection.
at line 381
MultiSelectBox
addMultiSelect($name, $label = NULL, array $items = NULL, $size = NULL)
Adds select box control that allows multiple item selection.
at line 397
SubmitButton
addSubmit($name, $caption = NULL)
Adds button used to submit form.
at line 409
Button
addButton($name, $caption = NULL)
Adds push buttons with no default behavior.
at line 422
ImageButton
addImage($name, $src = NULL, $alt = NULL)
Adds graphical button used to submit form.
at line 433
Container
addContainer($name)
Adds naming container to the form.
at line 450
void
offsetSet($name, $component)
Adds the component to the container.
at line 462
IComponent
offsetGet($name)
Returns component specified by name. Throws exception if component doesn't exist.
at line 473
bool
offsetExists($name)
Does component specified by name exists?
at line 484
void
offsetUnset($name)
Removes component from the container.
at line 496
__clone()
Prevents cloning.