73 return $this->imageFile !==
null
74 ? basename($this->imageFile)
159 ): array|float|bool|
int|string|null
164 'image' => $this->imageFile
176 $clone = clone $this;
177 $clone->position = $transformations->
int($normalized[
'position']);
178 $clone->answertext = $transformations->
nullableString($normalized[
'answertext']);
179 $clone->imageFile = $transformations->
denormalize($normalized[
'image'], QuestionImage::class)?->getFilename();
180 $clone->correctness = $transformations->
int($normalized[
'correctness']);
Wrapper object for an image file within a question (e.g.
setThumbPrefix($thumbPrefix)
fromNormalized(array $normalized, Transformations $transformations)
Restore the object from its normalized representation.
setAnswertext($answertext)
setImageFsDir($imageFsDir)
toNormalized(Transformations $transformations, array $context=[])
Convert the internal state of the implementing object into a language-neutral array structure.
setImageWebDir($imageWebDir)
setCorrectness($correctness)
setImageFile(?string $imageFile)