tick() Ticks a checkbox. Exceptions LogicException When the type provided is not correct
bool isMultiple() Returns true if the field accepts multiple values. Return Value bool true if the field accepts multiple values, false otherwise
select(string $value) Sets the value of the field. Parameters string $value The value of the field
setValue(string $value) Sets the value of the field. Parameters string $value The value of the field Exceptions InvalidArgumentException When value type provided is not correct
bool isDisabled() Check if the current selected option is disabled. Return Value bool
bool hasValue() Returns true if the field should be included in the submitted values. Return Value bool true if the field should be included in the submitted values, false otherwise
ChoiceFormField disableValidation() Disables the internal validation of the field. Return Value ChoiceFormField
string getType() Returns the type of the choice field (radio, select, or checkbox). Return Value string The type
addChoice(DOMElement $node) Adds a choice to the current ones. This method should only be used internally. Parameters DOMElement $node Exceptions LogicException When choice provided is not multiple nor radio
bool containsOption(string $optionValue, array $options) Checks whether given value is in the existing options. Parameters string $optionValue array $options Return Value bool
Page 676 of 787