ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilIndividualAssessmentSettings.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22use ILIAS\Refinery\Factory as Refinery;
23
29{
30 protected int $obj_id;
31 protected string $title;
32 protected string $description;
33 protected string $content;
34 protected string $record_template;
36 protected bool $file_required;
37
38 public function __construct(
39 int $obj_id,
40 string $title,
41 string $description,
42 string $content,
43 string $record_template,
46 ) {
47 $this->obj_id = $obj_id;
48 $this->title = $title;
49 $this->description = $description;
50 $this->content = $content;
51 $this->record_template = $record_template;
52 $this->event_time_place_required = $event_time_place_required;
53 $this->file_required = $file_required;
54 }
55
59 public function getObjId(): int
60 {
61 return $this->obj_id;
62 }
63
67 public function getTitle(): string
68 {
69 return $this->title;
70 }
71
75 public function getDescription(): string
76 {
77 return $this->description;
78 }
79
83 public function getContent(): string
84 {
85 return $this->content;
86 }
87
92 public function getRecordTemplate(): string
93 {
95 }
96
100 public function isEventTimePlaceRequired(): bool
101 {
103 }
104
108 public function isFileRequired(): bool
109 {
111 }
112
113 public function toFormInput(
114 Field\Factory $input,
118 return $input->section(
119 [
120 $input->text($lng->txt("title"))
121 ->withValue($this->getTitle())
122 ->withRequired(true),
123 $input->textarea($lng->txt("description"))
124 ->withValue($this->getDescription()),
125 $input->textarea($lng->txt("iass_content"), $lng->txt("iass_content_explanation"))
126 ->withValue($this->getContent()),
127 $input->textarea($lng->txt("iass_record_template"), $lng->txt("iass_record_template_explanation"))
128 ->withValue($this->getRecordTemplate()),
129 $input->checkbox($lng->txt("iass_event_time_place_required"), $lng->txt("iass_event_time_place_required_info"))
131 $input->checkbox($lng->txt("iass_file_required"), $lng->txt("iass_file_required_info"))
132 ->withValue($this->isFileRequired())
133 ],
134 $lng->txt("settings")
136 $refinery->custom()->transformation(function ($value) {
138 $this->getObjId(),
139 ...$value
140 );
141 })
142 );
143 }
144}
Builds data types.
Definition: Factory.php:36
Definition: UI.php:24
return true
An object carrying settings of an Individual Assessment obj beyond the standard 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
return['delivery_method'=> 'php',]
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This describes inputs that can be used in forms.
Definition: FormInput.php:33
This is what a factory for input fields looks like.
Definition: Factory.php:31
This describes commonalities between all inputs.
Definition: Input.php:47
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Checkbox.php:21
withAdditionalTransformation(Transformation $trafo)
@inheritDoc
withValue($value)
Get an input like this with another value displayed on the client side.
Definition: Group.php:61
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.
global $lng
Definition: privfeed.php:31