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.
|
void |
__clone
()
Prevents cloning.
|
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 386 addButtonpublic NButton addButton (string $name, string $caption) Adds push buttons with no default behavior.
|
||||||||||||||||||||||||
line 316 addCheckboxpublic NCheckbox addCheckbox (string $name, string $caption) Adds check box control to the form.
|
||||||||||||||||||||||||
line 200 addComponentpublic void addComponent ($component, string $name, [string $insertBefore = Adds the specified component to the IComponentContainer. Implementation of:
|
||||||||||||||||||||||||
line 412 addContainerpublic NFormContainer addContainer (string $name) Adds naming container to the form.
|
||||||||||||||||||||||||
line 291 addFilepublic NFileUpload addFile (string $name, [string $label = Adds control that allows the user to upload files.
|
||||||||||||||||||||||||
line 303 addHiddenpublic NHiddenField addHidden (string $name) Adds hidden form control used to store a non-displayed value.
|
||||||||||||||||||||||||
line 400 addImagepublic NImageButton addImage (string $name, [string $src = Adds graphical button used to submit form.
|
||||||||||||||||||||||||
line 360 addMultiSelectpublic NMultiSelectBox addMultiSelect (string $name, [string $label = Adds select box control that allows multiple item selection.
|
||||||||||||||||||||||||
line 260 addPasswordpublic NTextInput addPassword (string $name, [string $label = Adds single-line text input control used for sensitive input such as passwords.
|
||||||||||||||||||||||||
line 330 addRadioListpublic NRadioList addRadioList (string $name, [string $label = Adds set of radio button controls to the form.
|
||||||||||||||||||||||||
line 426 addRepeaterpublic NRepeaterControl addRepeater (string $name) Adds control that repeats a specified prototype for each item in the list.
|
||||||||||||||||||||||||
line 345 addSelectpublic NSelectBox addSelect (string $name, [string $label = Adds select box control that allows single item selection.
|
||||||||||||||||||||||||
line 373 addSubmitpublic NSubmitButton addSubmit (string $name, string $caption) Adds button used to submit form.
|
||||||||||||||||||||||||
line 245 addTextpublic NTextInput addText (string $name, [string $label = Adds single-line text input control to the form.
|
||||||||||||||||||||||||
line 278 addTextAreapublic NTextArea addTextArea (string $name, [string $label = Adds multi-line text input control to the form.
|
||||||||||||||||||||||||
line 214 getControlspublic ArrayIterator getControls () Iterates over all form controls.
|
||||||||||||||||||||||||
line 226 getFormpublic NForm getForm ([bool $need = Returns form. Overridden in child classes as:
|
||||||||||||||||||||||||
line 119 getValuespublic array getValues () Returns the values submitted by the form. Overridden in child classes as:
|
||||||||||||||||||||||||
line 150 isValidpublic bool isValid () Is form valid?
|
||||||||||||||||||||||||
line 468 offsetExistspublic bool offsetExists (string $name) Does component specified by name exists? Implementation of:
ArrayAccess::offsetExists
|
||||||||||||||||||||||||
line 456 offsetGetpublic IComponent offsetGet (string $name) Returns component specified by name. Throws exception if component doesn't exist. Implementation of:
ArrayAccess::offsetGet
|
||||||||||||||||||||||||
line 443 offsetSetpublic void. offsetSet (string $name, IComponent $component) Adds the component to the container. Implementation of:
ArrayAccess::offsetSet
|
||||||||||||||||||||||||
line 480 offsetUnsetpublic void offsetUnset (string $name) Removes component from the container. Throws exception if component doesn't exist. Implementation of:
ArrayAccess::offsetUnset
|
||||||||||||||||||||||||
line 184 setCurrentGrouppublic NFormContainer setCurrentGroup ([NFormGroup $group =
|
||||||||||||||||||||||||
line 60 setDefaultspublic NFormContainer setDefaults (array|Traversable $values, [bool $erase = Fill-in with default values.
|
||||||||||||||||||||||||
line 77 setValuespublic NFormContainer setValues (array|Traversable $values, [bool $erase = Fill-in with values.
|
||||||||||||||||||||||||
line 164 validatepublic void validate () Performs the server side validation.
|
||||||||||||||||||||||||
line 493 __clonepublic void __clone () Prevents cloning.
|