19declare(strict_types=1);
58 ?
string $a_image =
null,
73 throw new \Exception(
'imagename must not be empty');
80 return $this->image !==
null;
87 ): array|float|bool|
int|string|null
90 ...$transformations->normalize(parent::toNormalized($transformations, $context)),
91 'image' => $this->image ?
103 $clone = parent::fromNormalized($normalized, $transformations);
104 $clone->setImage($transformations->
denormalize($normalized[
'image'], QuestionImage::class)?->getFilename());
Class for answers with a binary state indicator.
setImage(?string $image=null)
toNormalized(Transformations $transformations, array $context=[])
Convert the internal state of the implementing object into a language-neutral array structure.
fromNormalized(array $normalized, Transformations $transformations)
Restore the object from its normalized representation.
__construct(string $answertext='', float $points=0.0, int $order=0, bool $state=false, ?string $a_image=null, int $id=-1)
ASS_AnswerBinaryStateImage constructor The constructor takes possible arguments an creates an instanc...
Class for true/false or yes/no answers.
Wrapper object for an image file within a question (e.g.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc