ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilIndividualAssessmentSettings.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
5use \ILIAS\UI\Component\Input\Field;
6use \ILIAS\Refinery\Factory as Refinery;
7
16{
20 protected $obj_id;
21
25 protected $title;
26
30 protected $description;
31
35 protected $content;
36
41
46
50 protected $file_required;
51
52 public function __construct(
53 int $obj_id,
54 string $title,
55 string $description,
56 string $content,
57 string $record_template,
60 ) {
61 $this->obj_id = $obj_id;
62 $this->title = $title;
63 $this->description = $description;
64 $this->content = $content;
65 $this->record_template = $record_template;
66 $this->event_time_place_required = $event_time_place_required;
67 $this->file_required = $file_required;
68 }
69
73 public function getObjId() : int
74 {
75 return $this->obj_id;
76 }
77
81 public function getTitle() : string
82 {
83 return $this->title;
84 }
85
89 public function getDescription() : string
90 {
91 return $this->description;
92 }
93
97 public function getContent() : string
98 {
99 return $this->content;
100 }
101
106 public function getRecordTemplate() : string
107 {
109 }
110
114 public function isEventTimePlaceRequired() : bool
115 {
117 }
118
122 public function isFileRequired() : bool
123 {
125 }
126
127 public function toFormInput(
128 Field\Factory $input,
130 Refinery $refinery
131 ) : Field\Input {
132 return $input->section(
133 [
134 $input->text($lng->txt("title"))
135 ->withValue($this->getTitle())
136 ->withRequired(true),
137 $input->textarea($lng->txt("description"))
138 ->withValue($this->getDescription()),
139 $input->textarea($lng->txt("iass_content"), $lng->txt("iass_content_explanation"))
140 ->withValue($this->getContent()),
141 $input->textarea($lng->txt("iass_record_template"), $lng->txt("iass_record_template_explanation"))
142 ->withValue($this->getRecordTemplate()),
143 $input->checkbox($lng->txt("iass_event_time_place_required"), $lng->txt("iass_event_time_place_required_info"))
144 ->withValue($this->isEventTimePlaceRequired()),
145 $input->checkbox($lng->txt("iass_file_required"), $lng->txt("iass_file_required_info"))
146 ->withValue($this->isFileRequired())
147 ],
148 $lng->txt("settings")
149 )->withAdditionalTransformation(
150 $refinery->custom()->transformation(function ($value) {
151 return new \ilIndividualAssessmentSettings(
152 $this->getObjId(),
153 ...$value
154 );
155 })
156 );
157 }
158}
An exception for terminatinating execution or to throw for unit testing.
return true
Flag indicating whether or not HTTP headers will be sent when outputting captcha image/audio.
An object carrying settings of an Individual Assessment obj beyond the standart information.
isEventTimePlaceRequired()
Get the value of the checkbox event_time_place_require.
isFileRequired()
Get the value of the checkbox file_required.
toFormInput(Field\Factory $input, \ilLanguage $lng, Refinery $refinery)
getTitle()
Get the content of this assessment, e.g.
__construct(int $obj_id, string $title, string $description, string $content, string $record_template, bool $event_time_place_required, bool $file_required)
getObjId()
Get the id of corresponding iass-object.
getDescription()
Get the content of this assessment, e.g.
getRecordTemplate()
Get the record template to be used as default record with corresponding object.
getContent()
Get the content of this assessment, e.g.
language handling
This is what a factory for input fields looks like.
Definition: Factory.php:11
This describes commonalities between all inputs.
Definition: Input.php:32
$lng