PHP 클래스 Symfony\Component\DomCrawler\Field\ChoiceFormField

It is constructed from a HTML select tag, or a HTML checkbox, or radio inputs.
저자: Fabien Potencier ([email protected])
상속: extends FormField
파일 보기 프로젝트 열기: symfony/dom-crawler 1 사용 예제들

공개 메소드들

메소드 설명
addChoice ( DOMElement $node ) Adds a choice to the current ones.
availableOptionValues ( ) : array Returns list of available field options.
containsOption ( string $optionValue, array $options ) : boolean Checks whether given value is in the existing options.
disableValidation ( ) : self Disables the internal validation of the field.
getType ( ) : string Returns the type of the choice field (radio, select, or checkbox).
hasValue ( ) : boolean Returns true if the field should be included in the submitted values.
isDisabled ( ) : boolean Check if the current selected option is disabled.
isMultiple ( ) : boolean Returns true if the field accepts multiple values.
select ( string $value ) Sets the value of the field.
setValue ( string $value ) Sets the value of the field.
tick ( ) Ticks a checkbox.
untick ( ) Ticks a checkbox.

보호된 메소드들

메소드 설명
initialize ( ) Initializes the form field.

비공개 메소드들

메소드 설명
buildOptionValue ( DOMElement $node ) : array Returns option value with associated disabled flag.

메소드 상세

addChoice() 공개 메소드

Adds a choice to the current ones.
public addChoice ( DOMElement $node )
$node DOMElement

availableOptionValues() 공개 메소드

Returns list of available field options.
public availableOptionValues ( ) : array
리턴 array

containsOption() 공개 메소드

Checks whether given value is in the existing options.
public containsOption ( string $optionValue, array $options ) : boolean
$optionValue string
$options array
리턴 boolean

disableValidation() 공개 메소드

Disables the internal validation of the field.
public disableValidation ( ) : self
리턴 self

getType() 공개 메소드

Returns the type of the choice field (radio, select, or checkbox).
public getType ( ) : string
리턴 string The type

hasValue() 공개 메소드

Returns true if the field should be included in the submitted values.
public hasValue ( ) : boolean
리턴 boolean true if the field should be included in the submitted values, false otherwise

initialize() 보호된 메소드

Initializes the form field.
protected initialize ( )

isDisabled() 공개 메소드

Check if the current selected option is disabled.
public isDisabled ( ) : boolean
리턴 boolean

isMultiple() 공개 메소드

Returns true if the field accepts multiple values.
public isMultiple ( ) : boolean
리턴 boolean true if the field accepts multiple values, false otherwise

select() 공개 메소드

Sets the value of the field.
public select ( string $value )
$value string The value of the field

setValue() 공개 메소드

Sets the value of the field.
public setValue ( string $value )
$value string The value of the field

tick() 공개 메소드

Ticks a checkbox.
public tick ( )

untick() 공개 메소드

Ticks a checkbox.
public untick ( )