PHP Класс Nette\Forms\Container

Наследование: extends Nette\ComponentModel\Container, implements ArrayAccess
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$onValidate function (Container $sender); Occurs when the form is validated

Защищенные свойства (Protected)

Свойство Тип Описание
$currentGroup ControlGroup

Открытые методы

Метод Описание
__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.

Описание методов

__call() публичный Метод

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

__clone() публичный Метод

Prevents cloning.
public __clone ( )

addButton() публичный Метод

Adds push buttons with no default behavior.
public addButton ( $name, $caption = NULL ) : Nette\Forms\Controls\Button
Результат Nette\Forms\Controls\Button

addCheckbox() публичный Метод

Adds check box control to the form.
public addCheckbox ( $name, $caption = NULL ) : Checkbox
Результат Nette\Forms\Controls\Checkbox

addCheckboxList() публичный Метод

Adds set of checkbox controls to the form.
public addCheckboxList ( $name, $label = NULL, array $items = NULL ) : CheckboxList
$items array
Результат Nette\Forms\Controls\CheckboxList

addComponent() публичный Метод

Adds the specified component to the IContainer.
public addComponent ( Nette\ComponentModel\IComponent $component, $name, $insertBefore = NULL ) : self
$component Nette\ComponentModel\IComponent
Результат self

addContainer() публичный Метод

Adds naming container to the form.
public addContainer ( $name ) : Container
Результат Container

addEmail() публичный Метод

Adds input for email.
public addEmail ( $name, $label = NULL ) : TextInput
Результат Nette\Forms\Controls\TextInput

addHidden() публичный Метод

Adds hidden form control used to store a non-displayed value.
public addHidden ( $name, $default = NULL ) : HiddenField
Результат Nette\Forms\Controls\HiddenField

addImage() публичный Метод

Adds graphical button used to submit form.
public addImage ( $name, $src = NULL, $alt = NULL ) : Nette\Forms\Controls\ImageButton
Результат Nette\Forms\Controls\ImageButton

addInteger() публичный Метод

Adds input for integer.
public addInteger ( $name, $label = NULL ) : TextInput
Результат Nette\Forms\Controls\TextInput

addMultiSelect() публичный Метод

Adds select box control that allows multiple item selection.
public addMultiSelect ( $name, $label = NULL, array $items = NULL, $size = NULL ) : MultiSelectBox
$items array
Результат Nette\Forms\Controls\MultiSelectBox

addMultiUpload() публичный Метод

Adds control that allows the user to upload multiple files.
public addMultiUpload ( $name, $label = NULL ) : UploadControl
Результат Nette\Forms\Controls\UploadControl

addPassword() публичный Метод

Adds single-line text input control used for sensitive input such as passwords.
public addPassword ( $name, $label = NULL, $cols = NULL, $maxLength = NULL ) : TextInput
Результат Nette\Forms\Controls\TextInput

addRadioList() публичный Метод

Adds set of radio button controls to the form.
public addRadioList ( $name, $label = NULL, array $items = NULL ) : RadioList
$items array
Результат Nette\Forms\Controls\RadioList

addSelect() публичный Метод

Adds select box control that allows single item selection.
public addSelect ( $name, $label = NULL, array $items = NULL, $size = NULL ) : SelectBox
$items array
Результат Nette\Forms\Controls\SelectBox

addSubmit() публичный Метод

Adds button used to submit form.
public addSubmit ( $name, $caption = NULL ) : Nette\Forms\Controls\SubmitButton
Результат Nette\Forms\Controls\SubmitButton

addText() публичный Метод

Adds single-line text input control to the form.
public addText ( $name, $label = NULL, $cols = NULL, $maxLength = NULL ) : TextInput
Результат Nette\Forms\Controls\TextInput

addTextArea() публичный Метод

Adds multi-line text input control to the form.
public addTextArea ( $name, $label = NULL, $cols = NULL, $rows = NULL ) : TextArea
Результат Nette\Forms\Controls\TextArea

addUpload() публичный Метод

Adds control that allows the user to upload files.
public addUpload ( $name, $label = NULL, $multiple = FALSE ) : UploadControl
Результат Nette\Forms\Controls\UploadControl

extensionMethod() публичный статический Метод

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

getControls() публичный Метод

Iterates over all form controls.
public getControls ( ) : ArrayIterator
Результат ArrayIterator

getCurrentGroup() публичный Метод

Returns current group.
public getCurrentGroup ( ) : ControlGroup
Результат ControlGroup

getErrors() публичный Метод

Returns all validation errors.
public getErrors ( ) : array
Результат array

getForm() публичный Метод

Returns form.
public getForm ( $need = TRUE ) : Form
Результат Form

getValues() публичный Метод

Returns the values submitted by the form.
public getValues ( $asArray = FALSE ) : Nette\Utils\ArrayHash | array
Результат Nette\Utils\ArrayHash | array

isValid() публичный Метод

Is form valid?
public isValid ( ) : boolean
Результат boolean

offsetExists() публичный Метод

Does component specified by name exists?
public offsetExists ( $name ) : boolean
Результат boolean

offsetGet() публичный Метод

Returns component specified by name. Throws exception if component doesn't exist.
public offsetGet ( $name ) : Nette\ComponentModel\IComponent
Результат Nette\ComponentModel\IComponent

offsetSet() публичный Метод

Adds the component to the container.
public offsetSet ( $name, $component ) : void
Результат void

offsetUnset() публичный Метод

Removes component from the container.
public offsetUnset ( $name ) : void
Результат void

setCurrentGroup() публичный Метод

public setCurrentGroup ( ControlGroup $group = NULL ) : self
$group ControlGroup
Результат self

setDefaults() публичный Метод

Fill-in with default values.
public setDefaults ( $values, $erase = FALSE ) : self
Результат self

setValues() публичный Метод

Fill-in with values.
public setValues ( $values, $erase = FALSE ) : self
Результат self

validate() публичный Метод

Performs the server side validation.
public validate ( array $controls = NULL ) : void
$controls array
Результат void

Описание свойств

$currentGroup защищенное свойство

protected ControlGroup,Nette\Forms $currentGroup
Результат ControlGroup

$onValidate публичное свойство

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