ChoiceFormField::tick()

tick() Ticks a checkbox. Exceptions LogicException When the type provided is not correct

ChoiceFormField::isMultiple()

bool isMultiple() Returns true if the field accepts multiple values. Return Value bool true if the field accepts multiple values, false otherwise

ChoiceFormField::select()

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

ChoiceFormField::setValue()

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

ChoiceFormField::isDisabled()

bool isDisabled() Check if the current selected option is disabled. Return Value bool

ChoiceFormField::hasValue()

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()

ChoiceFormField disableValidation() Disables the internal validation of the field. Return Value ChoiceFormField

ChoiceFormField::getType()

string getType() Returns the type of the choice field (radio, select, or checkbox). Return Value string The type

ChoiceFormField::addChoice()

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

ChoiceFormField::containsOption()

bool containsOption(string $optionValue, array $options) Checks whether given value is in the existing options. Parameters string $optionValue array $options Return Value bool