133 public function setState(
bool $state =
false): void
190 ): array|float|bool|
int|string|null
193 ...$transformations->normalize(parent::toNormalized($transformations, $context)),
204 $clone = parent::fromNormalized($normalized, $transformations);
205 $clone->setState($transformations->
bool($normalized[
'checked']));
Class for true/false or yes/no answers.
setUnchecked()
Sets the answer as a unchecked answer.
getState()
Gets the state.
setState(bool $state=false)
Sets the state.
toNormalized(Transformations $transformations, array $context=[])
Convert the internal state of the implementing object into a language-neutral array structure.
isStateSet()
Gets the state.
__construct(string $answertext="", float $points=0.0, int $order=0, bool $checked=false, int $id=-1)
ASS_AnswerBinaryState constructor The constructor takes possible arguments and creates an instance of...
isStateUnchecked()
Gets the state.
isStateChecked()
Gets the state.
setUnset()
Sets the answer as a unset answer.
setSet()
Sets the answer as a set answer.
fromNormalized(array $normalized, Transformations $transformations)
Restore the object from its normalized representation.
setChecked()
Sets the answer as a checked answer.
isStateUnset()
Gets the state.
Class for simple answers.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc