ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilIndividualAssessmentInfoSettings.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22use ILIAS\Refinery\Factory as Refinery;
23
25{
26 protected int $obj_id;
27 protected ?string $contact;
28 protected ?string $responsibility;
29 protected ?string $phone;
30 protected ?string $mails;
31 protected ?string $consultation_hours;
32
33 public function __construct(
34 int $obj_id,
35 ?string $contact = null,
36 ?string $responsibility = null,
37 ?string $phone = null,
38 ?string $mails = null,
39 ?string $consultation_hours = null
40 ) {
41 $this->obj_id = $obj_id;
42 $this->contact = $contact;
43 $this->responsibility = $responsibility;
44 $this->phone = $phone;
45 $this->mails = $mails;
46 $this->consultation_hours = $consultation_hours;
47 }
48
49 public function getObjId(): int
50 {
51 return $this->obj_id;
52 }
53
54 public function getContact(): ?string
55 {
56 return $this->contact;
57 }
58
59 public function getResponsibility(): ?string
60 {
62 }
63
64 public function getPhone(): ?string
65 {
66 return $this->phone;
67 }
68
69 public function getMails(): ?string
70 {
71 return $this->mails;
72 }
73
74 public function getConsultationHours(): ?string
75 {
77 }
78
79 public function toFormInput(
80 Field\Factory $input,
84 return $input->section(
85 [
86 $input->text($lng->txt("iass_contact"))
87 ->withValue((string) $this->getContact())
88 ->withRequired(true),
89 $input->text($lng->txt("iass_responsibility"))
90 ->withValue((string) $this->getResponsibility()),
91 $input->text($lng->txt("iass_phone"))
92 ->withValue((string) $this->getPhone()),
93 $input->textarea($lng->txt("iass_mails"), $lng->txt("iass_info_emails_expl"))
94 ->withValue((string) $this->getMails()),
95 $input->textarea($lng->txt("iass_consultation_hours"))
96 ->withValue((string) $this->getConsultationHours())
97 ],
98 $lng->txt("settings")
100 $refinery->custom()->transformation(function ($value) {
102 $this->getObjId(),
103 ...$value
104 );
105 })
106 );
107 }
108}
Builds data types.
Definition: Factory.php:36
Definition: UI.php:24
return true
__construct(int $obj_id, ?string $contact=null, ?string $responsibility=null, ?string $phone=null, ?string $mails=null, ?string $consultation_hours=null)
toFormInput(Field\Factory $input, ilLanguage $lng, Refinery $refinery)
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