Container
class Container extends Container implements ArrayAccess
Container for form controls.
Properties
callable[] | $onValidate | ||
protected ControlGroup|null | $currentGroup | ||
ArrayHash | $values | ||
Iterator read-only | $controls | ||
Form|null 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 input for integer.
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.
No description
No description
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 160
array
getErrors()
Returns all validation errors.
at line 176
Container
setCurrentGroup(ControlGroup $group = null)
No description
at line 187
ControlGroup|null
getCurrentGroup()
Returns current group.
at line 201
Container
addComponent(IComponent $component, $name, $insertBefore = null)
Adds the specified component to the IContainer.
at line 215
Iterator
getControls()
Iterates over all form controls.
at line 226
Form|null
getForm($throw = true)
Returns form.
at line 243
TextInput
addText($name, $label = null, $cols = null, $maxLength = null)
Adds single-line text input control to the form.
at line 258
TextInput
addPassword($name, $label = null, $cols = null, $maxLength = null)
Adds single-line text input control used for sensitive input such as passwords.
at line 274
TextArea
addTextArea($name, $label = null, $cols = null, $rows = null)
Adds multi-line text input control to the form.
at line 287
TextInput
addEmail($name, $label = null)
Adds input for email.
at line 301
TextInput
addInteger($name, $label = null)
Adds input for integer.
at line 317
UploadControl
addUpload($name, $label = null, $multiple = false)
Adds control that allows the user to upload files.
at line 329
UploadControl
addMultiUpload($name, $label = null)
Adds control that allows the user to upload multiple files.
at line 341
HiddenField
addHidden($name, $default = null)
Adds hidden form control used to store a non-displayed value.
at line 354
Checkbox
addCheckbox($name, $caption = null)
Adds check box control to the form.
at line 366
RadioList
addRadioList($name, $label = null, array $items = null)
Adds set of radio button controls to the form.
at line 378
CheckboxList
addCheckboxList($name, $label = null, array $items = null)
Adds set of checkbox controls to the form.
at line 392
SelectBox
addSelect($name, $label = null, array $items = null, $size = null)
Adds select box control that allows single item selection.
at line 407
MultiSelectBox
addMultiSelect($name, $label = null, array $items = null, $size = null)
Adds select box control that allows multiple item selection.
at line 420
SubmitButton
addSubmit($name, $caption = null)
Adds button used to submit form.
at line 432
Button
addButton($name, $caption = null)
Adds push buttons with no default behavior.
at line 445
ImageButton
addImage($name, $src = null, $alt = null)
Adds graphical button used to submit form.
at line 456
Container
addContainer($name)
Adds naming container to the form.
at line 470
__call($name, $args)
No description
at line 479
static
extensionMethod($name, $callback = null)
No description
at line 497
void
offsetSet($name, $component)
Adds the component to the container.
at line 509
IComponent
offsetGet($name)
Returns component specified by name. Throws exception if component doesn't exist.
at line 520
bool
offsetExists($name)
Does component specified by name exists?
at line 531
void
offsetUnset($name)
Removes component from the container.
at line 543
__clone()
Prevents cloning.