Container
class Container extends Container implements ArrayAccess
Container for form controls.
Constants
private 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.
Returns the values submitted by the form.
Returns the potentially unvalidated values submitted by the form.
No description
Is form valid?
Performs the server side validation.
Returns all validation errors.
No description
Returns current group.
Adds the component to the container.
Iterates over all form controls.
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 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 push buttons with no default behavior.
Adds graphical button used to submit form.
Adds naming container to the form.
No description
No description
Object cloning.
Details
at line 52
Container
setDefaults(array|object $data, bool $erase = false)
Fill-in with default values.
at line 67
Container
setValues(array|object $data, bool $erase = false)
internal |
Fill-in with values.
at line 104
object|array
getValues(string|object|bool|null $returnType = null, array|null $controls = null)
Returns the values submitted by the form.
at line 135
object|array
getUnsafeValues(string|object|null $returnType, array|null $controls = null)
Returns the potentially unvalidated values submitted by the form.
at line 180
Container
setMappedType(string $type)
No description
at line 193
bool
isValid()
Is form valid?
at line 214
void
validate(array|null $controls = null)
Performs the server side validation.
at line 239
array
getErrors()
Returns all validation errors.
at line 253
Container
setCurrentGroup(ControlGroup|null $group = null)
No description
at line 263
ControlGroup|null
getCurrentGroup()
Returns current group.
at line 273
IContainer
addComponent(IComponent $component, string|null $name, string|null $insertBefore = null)
Adds the component to the container.
at line 294
Iterator
getControls()
Iterates over all form controls.
at line 303
Form|null
getForm(bool $throw = true)
Returns form.
at line 315
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 329
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 344
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 358
TextInput
addEmail(string $name, string|Stringable|null $label = null)
Adds input for email.
at line 368
TextInput
addInteger(string $name, string|Stringable|null $label = null)
Adds input for integer.
at line 379
UploadControl
addUpload(string $name, string|Stringable|null $label = null)
Adds control that allows the user to upload files.
at line 388
UploadControl
addMultiUpload(string $name, string|Stringable|null $label = null)
Adds control that allows the user to upload multiple files.
at line 397
HiddenField
addHidden(string $name, $default = null)
Adds hidden form control used to store a non-displayed value.
at line 407
Checkbox
addCheckbox(string $name, string|Stringable|null $caption = null)
Adds check box control to the form.
at line 416
RadioList
addRadioList(string $name, string|Stringable|null $label = null, array|null $items = null)
Adds set of radio button controls to the form.
at line 425
CheckboxList
addCheckboxList(string $name, string|Stringable|null $label = null, array|null $items = null)
Adds set of checkbox controls to the form.
at line 437
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 451
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 465
SubmitButton
addSubmit(string $name, string|Stringable|null $caption = null)
Adds button used to submit form.
at line 474
Button
addButton(string $name, string|Stringable|null $caption = null)
Adds push buttons with no default behavior.
at line 485
ImageButton
addImageButton(string $name, string|null $src = null, string|null $alt = null)
Adds graphical button used to submit form.
at line 492
ImageButton
addImage()
deprecated
deprecated
No description
at line 501
Container
addContainer(string|int $name)
Adds naming container to the form.
at line 516
mixed
__call(string $name, array $args)
No description
at line 526
static void
extensionMethod(string $name, $callback)
No description
at line 539
__clone()
Object cloning.
Traits
Implementation of \ArrayAccess for IContainer.