Container
class Container extends Container implements ArrayAccess
Container for form controls.
Constants
private ARRAY |
|
Properties
$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.
No description
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.
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
Prevents cloning.
Details
at line 53
Container
setDefaults(array|object $data, bool $erase = false)
Fill-in with default values.
at line 69
Container
setValues(array|object $data, bool $erase = false)
internal |
Fill-in with values.
at line 108
object|array
getValues(string|null $returnType = null)
Returns the values submitted by the form.
at line 134
Container
setMappedType(string $type)
No description
at line 147
bool
isValid()
Is form valid?
at line 163
void
validate(array $controls = null)
Performs the server side validation.
at line 189
array
getErrors()
Returns all validation errors.
at line 203
Container
setCurrentGroup(ControlGroup $group = null)
No description
at line 213
ControlGroup|null
getCurrentGroup()
Returns current group.
at line 224
Container
addComponent(IComponent $component, string|null $name, string $insertBefore = null)
Adds the specified component to the IContainer.
at line 237
Iterator
getControls()
Iterates over all form controls.
at line 246
Form|null
getForm(bool $throw = true)
Returns form.
at line 259
TextInput
addText(string $name, string|object $label = null, int $cols = null, int $maxLength = null)
Adds single-line text input control to the form.
at line 270
TextInput
addPassword(string $name, string|object $label = null, int $cols = null, int $maxLength = null)
Adds single-line text input control used for sensitive input such as passwords.
at line 286
TextArea
addTextArea(string $name, string|object $label = null, int $cols = null, int $rows = null)
Adds multi-line text input control to the form.
at line 297
TextInput
addEmail(string $name, string|object $label = null)
Adds input for email.
at line 308
TextInput
addInteger(string $name, string|object $label = null)
Adds input for integer.
at line 320
UploadControl
addUpload(string $name, string|object $label = null)
Adds control that allows the user to upload files.
at line 334
UploadControl
addMultiUpload(string $name, string|object $label = null)
Adds control that allows the user to upload multiple files.
at line 343
HiddenField
addHidden(string $name, $default = null)
Adds hidden form control used to store a non-displayed value.
at line 354
Checkbox
addCheckbox(string $name, string|object $caption = null)
Adds check box control to the form.
at line 364
RadioList
addRadioList(string $name, string|object $label = null, array $items = null)
Adds set of radio button controls to the form.
at line 374
CheckboxList
addCheckboxList(string $name, string|object $label = null, array $items = null)
Adds set of checkbox controls to the form.
at line 384
SelectBox
addSelect(string $name, string|object $label = null, array $items = null, int $size = null)
Adds select box control that allows single item selection.
at line 395
MultiSelectBox
addMultiSelect(string $name, string|object $label = null, array $items = null, int $size = null)
Adds select box control that allows multiple item selection.
at line 410
SubmitButton
addSubmit(string $name, string|object $caption = null)
Adds button used to submit form.
at line 420
Button
addButton(string $name, string|object $caption = null)
Adds push buttons with no default behavior.
at line 431
ImageButton
addImage(string $name, string $src = null, string $alt = null)
Adds graphical button used to submit form.
at line 441
Container
addContainer(string|int $name)
Adds naming container to the form.
at line 455
__call(string $name, array $args)
No description
at line 464
static void
extensionMethod(string $name, $callback)
No description
at line 476
__clone()
Prevents cloning.