Class NFormContainer
Container for form controls.
NObject | --NComponent | --NComponentContainer | --NFormContainer
Implements interfaces:
Direct Known Sub-classes:
Public Method Summary | |
---|---|
NButton |
addButton
(string $name, string $caption)
Adds push buttons with no default behavior.
|
NCheckbox |
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.
|
NFormContainer |
addContainer
(string $name)
Adds naming container to the form.
|
NFileUpload |
addFile
(string $name, [string $label =
NULL ])
Adds control that allows the user to upload files.
|
NHiddenField |
addHidden
(string $name)
Adds hidden form control used to store a non-displayed value.
|
NImageButton |
Adds graphical button used to submit form.
|
NMultiSelectBox |
Adds select box control that allows multiple item selection.
|
NTextInput |
Adds single-line text input control used for sensitive input such as passwords.
|
NRadioList |
Adds set of radio button controls to the form.
|
NRepeaterControl |
addRepeater
(string $name)
Adds control that repeats a specified prototype for each item in the list.
|
NSelectBox |
Adds select box control that allows single item selection.
|
NSubmitButton |
addSubmit
(string $name, string $caption)
Adds button used to submit form.
|
NTextInput |
Adds single-line text input control to the form.
|
NTextArea |
Adds multi-line text input control to the form.
|
ArrayIterator |
getControls
()
Iterates over all form controls.
|
NForm |
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.
|
NFormContainer |
|
NFormContainer |
setDefaults
(array|Traversable $values, [bool $erase =
FALSE ])
Fill-in with default values.
|
NFormContainer |
setValues
(array|Traversable $values, [bool $erase =
FALSE ])
Fill-in with values.
|
void |
validate
()
Performs the server side validation.
|
Methods Inherited From NComponentContainer |
---|
addComponent(), createComponent(), getComponent(), getComponents(), removeComponent(), validateChildComponent(), __clone() |
Methods Inherited From NComponent |
---|
__construct(), attached(), detached(), getName(), getParent(), lookup(), lookupPath(), monitor(), setParent(), unmonitor(), validateParent(), __clone(), __wakeup() |
Methods Inherited From NObject |
---|
extensionMethod(), getClass(), getReflection(), __call(), __callStatic(), __get(), __isset(), __set(), __unset() |
Variable Summary | ||||
---|---|---|---|---|
protected NFormGroup | $currentGroup |
|
line 43 |
|
protected bool | $valid |
|
line 46 |
Method Details | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
line 385 addButtonpublic NButton addButton (string $name, string $caption) Adds push buttons with no default behavior.
|
||||||||||||||||||||||||
line 315 addCheckboxpublic NCheckbox addCheckbox (string $name, string $caption) Adds check box control to the form.
|
||||||||||||||||||||||||
line 199 addComponentpublic void addComponent ($component, string $name, [string $insertBefore = Adds the specified component to the IComponentContainer. Implementation of:
|
||||||||||||||||||||||||
line 411 addContainerpublic NFormContainer addContainer (string $name) Adds naming container to the form.
|
||||||||||||||||||||||||
line 290 addFilepublic NFileUpload addFile (string $name, [string $label = Adds control that allows the user to upload files.
|
||||||||||||||||||||||||
line 302 addHiddenpublic NHiddenField addHidden (string $name) Adds hidden form control used to store a non-displayed value.
|
||||||||||||||||||||||||
line 399 addImagepublic NImageButton addImage (string $name, [string $src = Adds graphical button used to submit form.
|
||||||||||||||||||||||||
line 359 addMultiSelectpublic NMultiSelectBox addMultiSelect (string $name, [string $label = Adds select box control that allows multiple item selection.
|
||||||||||||||||||||||||
line 259 addPasswordpublic NTextInput addPassword (string $name, [string $label = Adds single-line text input control used for sensitive input such as passwords.
|
||||||||||||||||||||||||
line 329 addRadioListpublic NRadioList addRadioList (string $name, [string $label = Adds set of radio button controls to the form.
|
||||||||||||||||||||||||
line 425 addRepeaterpublic NRepeaterControl addRepeater (string $name) Adds control that repeats a specified prototype for each item in the list.
|
||||||||||||||||||||||||
line 344 addSelectpublic NSelectBox addSelect (string $name, [string $label = Adds select box control that allows single item selection.
|
||||||||||||||||||||||||
line 372 addSubmitpublic NSubmitButton addSubmit (string $name, string $caption) Adds button used to submit form.
|
||||||||||||||||||||||||
line 244 addTextpublic NTextInput addText (string $name, [string $label = Adds single-line text input control to the form.
|
||||||||||||||||||||||||
line 277 addTextAreapublic NTextArea addTextArea (string $name, [string $label = Adds multi-line text input control to the form.
|
||||||||||||||||||||||||
line 213 getControlspublic ArrayIterator getControls () Iterates over all form controls.
|
||||||||||||||||||||||||
line 225 getFormpublic NForm getForm ([bool $need = Returns form. Overridden in child classes as:
|
||||||||||||||||||||||||
line 118 getValuespublic array getValues () Returns the values submitted by the form. Overridden in child classes as:
|
||||||||||||||||||||||||
line 149 isValidpublic bool isValid () Is form valid?
|
||||||||||||||||||||||||
line 467 offsetExistspublic bool offsetExists (string $name) Does component specified by name exists? Implementation of:
ArrayAccess::offsetExists
|
||||||||||||||||||||||||
line 455 offsetGetpublic IComponent offsetGet (string $name) Returns component specified by name. Throws exception if component doesn't exist. Implementation of:
ArrayAccess::offsetGet
|
||||||||||||||||||||||||
line 442 offsetSetpublic void. offsetSet (string $name, IComponent $component) Adds the component to the container. Implementation of:
ArrayAccess::offsetSet
|
||||||||||||||||||||||||
line 479 offsetUnsetpublic void offsetUnset (string $name) Removes component from the container. Throws exception if component doesn't exist. Implementation of:
ArrayAccess::offsetUnset
|
||||||||||||||||||||||||
line 183 setCurrentGrouppublic NFormContainer setCurrentGroup ([NFormGroup $group =
|
||||||||||||||||||||||||
line 60 setDefaultspublic NFormContainer setDefaults (array|Traversable $values, [bool $erase = Fill-in with default values.
|
||||||||||||||||||||||||
line 76 setValuespublic NFormContainer setValues (array|Traversable $values, [bool $erase = Fill-in with values.
|
||||||||||||||||||||||||
line 163 validatepublic void validate () Performs the server side validation.
|