ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilIndividualAssessmentInfoSettings.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
9{
13 protected $obj_id;
14
18 protected $contact;
19
23 protected $responsibility;
24
28 protected $phone;
29
33 protected $mails;
34
39
40 public function __construct(
41 int $obj_id,
42 ?string $contact,
43 ?string $responsibility,
44 ?string $phone,
45 ?string $mails,
47 ) {
48 $this->obj_id = $obj_id;
49 $this->contact = $contact;
50 $this->responsibility = $responsibility;
51 $this->phone = $phone;
52 $this->mails = $mails;
53 $this->consultation_hours = $consultation_hours;
54 }
55
56 public function getObjId() : int
57 {
58 return $this->obj_id;
59 }
60
61 public function getContact() : ?string
62 {
63 return $this->contact;
64 }
65
66 public function getResponsibility() : ?string
67 {
69 }
70
71 public function getPhone() : ?string
72 {
73 return $this->phone;
74 }
75
76 public function getMails() : ?string
77 {
78 return $this->mails;
79 }
80
81 public function getConsultationHours() : ?string
82 {
84 }
85
86 public function toFormInput(
87 Field\Factory $input,
89 Refinery $refinery
90 ) : Field\Input {
91 return $input->section(
92 [
93 $input->text($lng->txt("iass_contact"))
94 ->withValue((string) $this->getContact())
95 ->withRequired(true),
96 $input->text($lng->txt("iass_responsibility"))
97 ->withValue((string) $this->getResponsibility()),
98 $input->text($lng->txt("iass_phone"))
99 ->withValue((string) $this->getPhone()),
100 $input->textarea($lng->txt("iass_mails"), $lng->txt("iass_info_emails_expl"))
101 ->withValue((string) $this->getMails()),
102 $input->textarea($lng->txt("iass_consultation_hours"))
103 ->withValue((string) $this->getConsultationHours())
104 ],
105 $lng->txt("settings")
106 )->withAdditionalTransformation(
107 $refinery->custom()->transformation(function ($value) {
109 $this->getObjId(),
110 ...$value
111 );
112 })
113 );
114 }
115}
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.
__construct(int $obj_id, ?string $contact, ?string $responsibility, ?string $phone, ?string $mails, ?string $consultation_hours)
toFormInput(Field\Factory $input, \ilLanguage $lng, Refinery $refinery)
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