PHP Class Nette\Forms\Container

Inheritance: extends Nette\ComponentModel\Container, implements ArrayAccess
Afficher le fichier Open project: nette/forms Class Usage Examples

Méthodes publiques

Свойство Type Description
$onValidate function (Container $sender); Occurs when the form is validated

Protected Properties

Свойство Type Description
$currentGroup ControlGroup

Méthodes publiques

Méthode Description
__call ( $name, $args ) ******************* extension methods ****************d*g*
__clone ( ) Prevents cloning.
addButton ( $name, $caption = NULL ) : Nette\Forms\Controls\Button Adds push buttons with no default behavior.
addCheckbox ( $name, $caption = NULL ) : Checkbox Adds check box control to the form.
addCheckboxList ( $name, $label = NULL, array $items = NULL ) : CheckboxList Adds set of checkbox controls to the form.
addComponent ( Nette\ComponentModel\IComponent $component, $name, $insertBefore = NULL ) : self Adds the specified component to the IContainer.
addContainer ( $name ) : Container Adds naming container to the form.
addEmail ( $name, $label = NULL ) : TextInput Adds input for email.
addHidden ( $name, $default = NULL ) : HiddenField Adds hidden form control used to store a non-displayed value.
addImage ( $name, $src = NULL, $alt = NULL ) : Nette\Forms\Controls\ImageButton Adds graphical button used to submit form.
addInteger ( $name, $label = NULL ) : TextInput Adds input for integer.
addMultiSelect ( $name, $label = NULL, array $items = NULL, $size = NULL ) : MultiSelectBox Adds select box control that allows multiple item selection.
addMultiUpload ( $name, $label = NULL ) : UploadControl Adds control that allows the user to upload multiple files.
addPassword ( $name, $label = NULL, $cols = NULL, $maxLength = NULL ) : TextInput Adds single-line text input control used for sensitive input such as passwords.
addRadioList ( $name, $label = NULL, array $items = NULL ) : RadioList Adds set of radio button controls to the form.
addSelect ( $name, $label = NULL, array $items = NULL, $size = NULL ) : SelectBox Adds select box control that allows single item selection.
addSubmit ( $name, $caption = NULL ) : Nette\Forms\Controls\SubmitButton Adds button used to submit form.
addText ( $name, $label = NULL, $cols = NULL, $maxLength = NULL ) : TextInput Adds single-line text input control to the form.
addTextArea ( $name, $label = NULL, $cols = NULL, $rows = NULL ) : TextArea Adds multi-line text input control to the form.
addUpload ( $name, $label = NULL, $multiple = FALSE ) : UploadControl Adds control that allows the user to upload files.
extensionMethod ( $name, $callback = NULL )
getControls ( ) : ArrayIterator Iterates over all form controls.
getCurrentGroup ( ) : ControlGroup Returns current group.
getErrors ( ) : array Returns all validation errors.
getForm ( $need = TRUE ) : Form Returns form.
getValues ( $asArray = FALSE ) : Nette\Utils\ArrayHash | array Returns the values submitted by the form.
isValid ( ) : boolean Is form valid?
offsetExists ( $name ) : boolean Does component specified by name exists?
offsetGet ( $name ) : Nette\ComponentModel\IComponent Returns component specified by name. Throws exception if component doesn't exist.
offsetSet ( $name, $component ) : void Adds the component to the container.
offsetUnset ( $name ) : void Removes component from the container.
setCurrentGroup ( ControlGroup $group = NULL ) : self
setDefaults ( $values, $erase = FALSE ) : self Fill-in with default values.
setValues ( $values, $erase = FALSE ) : self Fill-in with values.
validate ( array $controls = NULL ) : void Performs the server side validation.

Method Details

__call() public méthode

******************* extension methods ****************d*g*
public __call ( $name, $args )

__clone() public méthode

Prevents cloning.
public __clone ( )

addButton() public méthode

Adds push buttons with no default behavior.
public addButton ( $name, $caption = NULL ) : Nette\Forms\Controls\Button
Résultat Nette\Forms\Controls\Button

addCheckbox() public méthode

Adds check box control to the form.
public addCheckbox ( $name, $caption = NULL ) : Checkbox
Résultat Nette\Forms\Controls\Checkbox

addCheckboxList() public méthode

Adds set of checkbox controls to the form.
public addCheckboxList ( $name, $label = NULL, array $items = NULL ) : CheckboxList
$items array
Résultat Nette\Forms\Controls\CheckboxList

addComponent() public méthode

Adds the specified component to the IContainer.
public addComponent ( Nette\ComponentModel\IComponent $component, $name, $insertBefore = NULL ) : self
$component Nette\ComponentModel\IComponent
Résultat self

addContainer() public méthode

Adds naming container to the form.
public addContainer ( $name ) : Container
Résultat Container

addEmail() public méthode

Adds input for email.
public addEmail ( $name, $label = NULL ) : TextInput
Résultat Nette\Forms\Controls\TextInput

addHidden() public méthode

Adds hidden form control used to store a non-displayed value.
public addHidden ( $name, $default = NULL ) : HiddenField
Résultat Nette\Forms\Controls\HiddenField

addImage() public méthode

Adds graphical button used to submit form.
public addImage ( $name, $src = NULL, $alt = NULL ) : Nette\Forms\Controls\ImageButton
Résultat Nette\Forms\Controls\ImageButton

addInteger() public méthode

Adds input for integer.
public addInteger ( $name, $label = NULL ) : TextInput
Résultat Nette\Forms\Controls\TextInput

addMultiSelect() public méthode

Adds select box control that allows multiple item selection.
public addMultiSelect ( $name, $label = NULL, array $items = NULL, $size = NULL ) : MultiSelectBox
$items array
Résultat Nette\Forms\Controls\MultiSelectBox

addMultiUpload() public méthode

Adds control that allows the user to upload multiple files.
public addMultiUpload ( $name, $label = NULL ) : UploadControl
Résultat Nette\Forms\Controls\UploadControl

addPassword() public méthode

Adds single-line text input control used for sensitive input such as passwords.
public addPassword ( $name, $label = NULL, $cols = NULL, $maxLength = NULL ) : TextInput
Résultat Nette\Forms\Controls\TextInput

addRadioList() public méthode

Adds set of radio button controls to the form.
public addRadioList ( $name, $label = NULL, array $items = NULL ) : RadioList
$items array
Résultat Nette\Forms\Controls\RadioList

addSelect() public méthode

Adds select box control that allows single item selection.
public addSelect ( $name, $label = NULL, array $items = NULL, $size = NULL ) : SelectBox
$items array
Résultat Nette\Forms\Controls\SelectBox

addSubmit() public méthode

Adds button used to submit form.
public addSubmit ( $name, $caption = NULL ) : Nette\Forms\Controls\SubmitButton
Résultat Nette\Forms\Controls\SubmitButton

addText() public méthode

Adds single-line text input control to the form.
public addText ( $name, $label = NULL, $cols = NULL, $maxLength = NULL ) : TextInput
Résultat Nette\Forms\Controls\TextInput

addTextArea() public méthode

Adds multi-line text input control to the form.
public addTextArea ( $name, $label = NULL, $cols = NULL, $rows = NULL ) : TextArea
Résultat Nette\Forms\Controls\TextArea

addUpload() public méthode

Adds control that allows the user to upload files.
public addUpload ( $name, $label = NULL, $multiple = FALSE ) : UploadControl
Résultat Nette\Forms\Controls\UploadControl

extensionMethod() public static méthode

public static extensionMethod ( $name, $callback = NULL )

getControls() public méthode

Iterates over all form controls.
public getControls ( ) : ArrayIterator
Résultat ArrayIterator

getCurrentGroup() public méthode

Returns current group.
public getCurrentGroup ( ) : ControlGroup
Résultat ControlGroup

getErrors() public méthode

Returns all validation errors.
public getErrors ( ) : array
Résultat array

getForm() public méthode

Returns form.
public getForm ( $need = TRUE ) : Form
Résultat Form

getValues() public méthode

Returns the values submitted by the form.
public getValues ( $asArray = FALSE ) : Nette\Utils\ArrayHash | array
Résultat Nette\Utils\ArrayHash | array

isValid() public méthode

Is form valid?
public isValid ( ) : boolean
Résultat boolean

offsetExists() public méthode

Does component specified by name exists?
public offsetExists ( $name ) : boolean
Résultat boolean

offsetGet() public méthode

Returns component specified by name. Throws exception if component doesn't exist.
public offsetGet ( $name ) : Nette\ComponentModel\IComponent
Résultat Nette\ComponentModel\IComponent

offsetSet() public méthode

Adds the component to the container.
public offsetSet ( $name, $component ) : void
Résultat void

offsetUnset() public méthode

Removes component from the container.
public offsetUnset ( $name ) : void
Résultat void

setCurrentGroup() public méthode

public setCurrentGroup ( ControlGroup $group = NULL ) : self
$group ControlGroup
Résultat self

setDefaults() public méthode

Fill-in with default values.
public setDefaults ( $values, $erase = FALSE ) : self
Résultat self

setValues() public méthode

Fill-in with values.
public setValues ( $values, $erase = FALSE ) : self
Résultat self

validate() public méthode

Performs the server side validation.
public validate ( array $controls = NULL ) : void
$controls array
Résultat void

Property Details

$currentGroup protected_oe property

protected ControlGroup,Nette\Forms $currentGroup
Résultat ControlGroup

$onValidate public_oe property

function (Container $sender); Occurs when the form is validated
public $onValidate