ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.assAnswerMultipleResponseImage.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
34{
35 public ?string $image = null;
36
50 public function __construct(
51 string $answertext = '',
52 float $points = 0.0,
53 int $order = 0,
54 int $id = -1,
55 int $state = 0
56 ) {
58 }
59
60 public function getImage(): ?string
61 {
62 return $this->image;
63 }
64
65 public function setImage(?string $image = null): void
66 {
67 if ($image === '') {
68 throw new \Exception('imagename must not be empty');
69 }
70 $this->image = $image;
71 }
72
73 public function hasImage(): bool
74 {
75 return $this->image !== null;
76 }
77}
ASS_AnswerBinaryStateImage is a class for answers with a binary state indicator (checked/unchecked,...
__construct(string $answertext='', float $points=0.0, int $order=0, int $id=-1, int $state=0)
ASS_AnswerMultipleResponse constructor.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc