Container
class Container extends Container implements ArrayAccess
Container for form controls.
Constants
Array |
|
Properties
$onValidate | Occurs when the form was validated |
||
protected | $currentGroup | ||
ArrayHash | $values | ||
Iterator read-only | $controls | ||
Form|null read-only | $form |
Methods
Fill-in with default values.
Fill-in with values.
Returns the values submitted by the form.
Returns the potentially unvalidated values submitted by the form.
No description
No description
Is form valid?
Performs the server side validation.
Returns all validation errors.
No description
Returns current group.
Adds the specified component to the IContainer.
Retrieves the entire hierarchy of form controls including nested.
Returns form.
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 email.
Adds input for integer.
Adds input for date selection.
Adds input for time selection.
Adds input for date and time selection.
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 color picker.
Adds button used to submit form.
Adds push buttons with no default behavior.
Adds graphical button used to submit form.
No description
Adds naming container to the form.
No description
No description
Prevents cloning.
Details
at line 51
Container
setDefaults(array|object $values, bool $erase = false)
Fill-in with default values.
at line 64
Container
setValues(array|object $values, bool $erase = false, bool $onlyDisabled = false)
internal |
Fill-in with values.
at line 94
object|array
getValues(string|object|bool|null $returnType = null, array|null $controls = null)
Returns the values submitted by the form.
at line 132
object|array
getUntrustedValues(string|object|null $returnType = null, array|null $controls = null)
Returns the potentially unvalidated values submitted by the form.
at line 181
getUnsafeValues($returnType, array|null $controls = null)
No description
at line 189
Container
setMappedType(string $type)
No description
at line 202
bool
isValid()
Is form valid?
at line 223
void
validate(array|null $controls = null)
Performs the server side validation.
at line 248
array
getErrors()
Returns all validation errors.
at line 262
Container
setCurrentGroup(ControlGroup|null $group = null)
No description
at line 272
ControlGroup|null
getCurrentGroup()
Returns current group.
at line 282
Container
addComponent(IComponent $component, string|null $name, string|null $insertBefore = null)
Adds the specified component to the IContainer.
at line 302
array
getControls()
Retrieves the entire hierarchy of form controls including nested.
at line 312
Form|null
getForm(bool $throw = true)
Returns form.
at line 324
TextInput
addText(string $name, string|Stringable|null $label = null, int|null $cols = null, int|null $maxLength = null)
Adds single-line text input control to the form.
at line 339
TextInput
addPassword(string $name, string|Stringable|null $label = null, int|null $cols = null, int|null $maxLength = null)
Adds single-line text input control used for sensitive input such as passwords.
at line 355
TextArea
addTextArea(string $name, string|Stringable|null $label = null, int|null $cols = null, int|null $rows = null)
Adds multi-line text input control to the form.
at line 370
TextInput
addEmail(string $name, string|Stringable|null $label = null, int $maxLength = 255)
Adds input for email.
at line 384
TextInput
addInteger(string $name, string|Stringable|null $label = null)
Adds input for integer.
at line 395
TextInput
addFloat(string $name, string|Stringable|null $label = null)
Adds input for float.
at line 408
DateTimeControl
addDate(string $name, string|object|null $label = null)
Adds input for date selection.
at line 417
DateTimeControl
addTime(string $name, string|object|null $label = null, bool $withSeconds = false)
Adds input for time selection.
at line 430
DateTimeControl
addDateTime(string $name, string|object|null $label = null, bool $withSeconds = false)
Adds input for date and time selection.
at line 443
UploadControl
addUpload(string $name, string|Stringable|null $label = null)
Adds control that allows the user to upload files.
at line 452
UploadControl
addMultiUpload(string $name, string|Stringable|null $label = null)
Adds control that allows the user to upload multiple files.
at line 461
HiddenField
addHidden(string $name, $default = null)
Adds hidden form control used to store a non-displayed value.
at line 471
Checkbox
addCheckbox(string $name, string|Stringable|null $caption = null)
Adds check box control to the form.
at line 480
RadioList
addRadioList(string $name, string|Stringable|null $label = null, array|null $items = null)
Adds set of radio button controls to the form.
at line 493
CheckboxList
addCheckboxList(string $name, string|Stringable|null $label = null, array|null $items = null)
Adds set of checkbox controls to the form.
at line 506
SelectBox
addSelect(string $name, string|Stringable|null $label = null, array|null $items = null, int|null $size = null)
Adds select box control that allows single item selection.
at line 521
MultiSelectBox
addMultiSelect(string $name, string|Stringable|null $label = null, array|null $items = null, int|null $size = null)
Adds select box control that allows multiple item selection.
at line 536
ColorPicker
addColor(string $name, string|Stringable|null $label = null)
Adds color picker.
at line 545
SubmitButton
addSubmit(string $name, string|Stringable|null $caption = null)
Adds button used to submit form.
at line 554
Button
addButton(string $name, string|Stringable|null $caption = null)
Adds push buttons with no default behavior.
at line 565
ImageButton
addImageButton(string $name, string|null $src = null, string|null $alt = null)
Adds graphical button used to submit form.
at line 571
ImageButton
addImage()
No description
at line 582
Container
addContainer(string|int $name)
Adds naming container to the form.
at line 594
__call(string $name, array $args)
No description
at line 604
static void
extensionMethod(string $name, $callback)
No description
at line 617
__clone()
Prevents cloning.