Class FormContainer (namespace Nette\Forms)
Container for form controls.
Object | --Component | --ComponentContainer | --FormContainer
Implements interfaces:
Direct Known Sub-classes:
Public Method Summary | |
---|---|
Button |
addButton
(string $name, string $caption)
Adds push buttons with no default behavior.
|
Checkbox |
addCheckbox
(string $name, string $caption)
Adds check box control to the form.
|
void |
addComponent
($component, string $name, [string $insertBefore =
NULL ])
Adds the specified component to the IComponentContainer.
|
FormContainer |
addContainer
(string $name)
Adds naming container to the form.
|
FileUpload |
addFile
(string $name, [string $label =
NULL ])
Adds control that allows the user to upload files.
|
HiddenField |
addHidden
(string $name)
Adds hidden form control used to store a non-displayed value.
|
ImageButton |
Adds graphical button used to submit form.
|
MultiSelectBox |
Adds select box control that allows multiple item selection.
|
TextInput |
Adds single-line text input control used for sensitive input such as passwords.
|
RadioList |
Adds set of radio button controls to the form.
|
SelectBox |
Adds select box control that allows single item selection.
|
SubmitButton |
addSubmit
(string $name, string $caption)
Adds button used to submit form.
|
TextInput |
Adds single-line text input control to the form.
|
TextArea |
Adds multi-line text input control to the form.
|
ArrayIterator |
getControls
()
Iterates over all form controls.
|
Form |
getForm
([bool $need =
TRUE ])
Returns form.
|
array |
getValues
()
Returns the values submitted by the form.
|
bool |
isValid
()
Is form valid?
|
bool |
offsetExists
(string $name)
Does component specified by name exists?
|
IComponent |
offsetGet
(string $name)
Returns component specified by name. Throws exception if component doesn't exist.
|
void. |
offsetSet
(string $name, IComponent $component)
Adds the component to the container.
|
void |
offsetUnset
(string $name)
Removes component from the container. Throws exception if component doesn't exist.
|
FormContainer |
|
FormContainer |
setDefaults
(array|Traversable $values, [bool $erase =
FALSE ])
Fill-in with default values.
|
FormContainer |
setValues
(array|Traversable $values, [bool $erase =
FALSE ])
Fill-in with values.
|
void |
validate
()
Performs the server side validation.
|
void |
__clone
()
Prevents cloning.
|
Methods Inherited From ComponentContainer |
---|
addComponent(), createComponent(), getComponent(), getComponents(), removeComponent(), validateChildComponent(), __clone() |
Methods Inherited From Component |
---|
__construct(), attached(), detached(), getName(), getParent(), lookup(), lookupPath(), monitor(), setParent(), unmonitor(), validateParent(), __clone(), __wakeup() |
Methods Inherited From Object |
---|
extensionMethod(), getClass(), getReflection(), __call(), __callStatic(), __get(), __isset(), __set(), __unset() |
Variable Summary | ||||
---|---|---|---|---|
protected FormGroup | $currentGroup |
|
line 32 |
|
array | $onValidate |
|
line 29 of function(Form $sender); Occurs when the form is validated |
|
protected bool | $valid |
|
line 35 |
Method Details | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
line 376 addButtonpublic Button addButton (string $name, string $caption) Adds push buttons with no default behavior.
|
||||||||||||||||||||||||
line 306 addCheckboxpublic Checkbox addCheckbox (string $name, string $caption) Adds check box control to the form.
|
||||||||||||||||||||||||
line 190 addComponentpublic void addComponent ($component, string $name, [string $insertBefore = Adds the specified component to the IComponentContainer. Implementation of:
|
||||||||||||||||||||||||
line 402 addContainerpublic FormContainer addContainer (string $name) Adds naming container to the form.
|
||||||||||||||||||||||||
line 281 addFilepublic FileUpload addFile (string $name, [string $label = Adds control that allows the user to upload files.
|
||||||||||||||||||||||||
line 293 addHiddenpublic HiddenField addHidden (string $name) Adds hidden form control used to store a non-displayed value.
|
||||||||||||||||||||||||
line 390 addImagepublic ImageButton addImage (string $name, [string $src = Adds graphical button used to submit form.
|
||||||||||||||||||||||||
line 350 addMultiSelectpublic MultiSelectBox addMultiSelect (string $name, [string $label = Adds select box control that allows multiple item selection.
|
||||||||||||||||||||||||
line 250 addPasswordpublic TextInput addPassword (string $name, [string $label = Adds single-line text input control used for sensitive input such as passwords.
|
||||||||||||||||||||||||
line 320 addRadioListpublic RadioList addRadioList (string $name, [string $label = Adds set of radio button controls to the form.
|
||||||||||||||||||||||||
line 335 addSelectpublic SelectBox addSelect (string $name, [string $label = Adds select box control that allows single item selection.
|
||||||||||||||||||||||||
line 363 addSubmitpublic SubmitButton addSubmit (string $name, string $caption) Adds button used to submit form.
|
||||||||||||||||||||||||
line 235 addTextpublic TextInput addText (string $name, [string $label = Adds single-line text input control to the form.
|
||||||||||||||||||||||||
line 268 addTextAreapublic TextArea addTextArea (string $name, [string $label = Adds multi-line text input control to the form.
|
||||||||||||||||||||||||
line 204 getControlspublic ArrayIterator getControls () Iterates over all form controls.
|
||||||||||||||||||||||||
line 216 getFormpublic Form getForm ([bool $need = Returns form. Overridden in child classes as:
|
||||||||||||||||||||||||
line 108 getValuespublic array getValues () Returns the values submitted by the form. Overridden in child classes as:
|
||||||||||||||||||||||||
line 139 isValidpublic bool isValid () Is form valid?
|
||||||||||||||||||||||||
line 446 offsetExistspublic bool offsetExists (string $name) Does component specified by name exists? Implementation of:
ArrayAccess::offsetExists
|
||||||||||||||||||||||||
line 434 offsetGetpublic IComponent offsetGet (string $name) Returns component specified by name. Throws exception if component doesn't exist. Implementation of:
ArrayAccess::offsetGet
|
||||||||||||||||||||||||
line 421 offsetSetpublic void. offsetSet (string $name, IComponent $component) Adds the component to the container. Implementation of:
ArrayAccess::offsetSet
|
||||||||||||||||||||||||
line 458 offsetUnsetpublic void offsetUnset (string $name) Removes component from the container. Throws exception if component doesn't exist. Implementation of:
ArrayAccess::offsetUnset
|
||||||||||||||||||||||||
line 174 setCurrentGrouppublic FormContainer setCurrentGroup ([FormGroup $group =
|
||||||||||||||||||||||||
line 49 setDefaultspublic FormContainer setDefaults (array|Traversable $values, [bool $erase = Fill-in with default values.
|
||||||||||||||||||||||||
line 66 setValuespublic FormContainer setValues (array|Traversable $values, [bool $erase = Fill-in with values.
|
||||||||||||||||||||||||
line 153 validatepublic void validate () Performs the server side validation.
|
||||||||||||||||||||||||
line 471 __clonepublic void __clone () Prevents cloning.
|