PHP 클래스 Nette\Forms\Container

상속: extends Nette\ComponentModel\Container, implements ArrayAccess
파일 보기 프로젝트 열기: nette/forms 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$onValidate function (Container $sender); Occurs when the form is validated

보호된 프로퍼티들

프로퍼티 타입 설명
$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.

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