ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilStudyProgrammeAutoMailSettings Class Reference
+ Collaboration diagram for ilStudyProgrammeAutoMailSettings:

Public Member Functions

 __construct (protected bool $send_re_assigned_mail, protected ?int $reminder_not_restarted_by_user_days, protected ?int $processing_ends_not_successful_days)
 
 getSendReAssignedMail ()
 
 getReminderNotRestartedByUserDays ()
 
 getProcessingEndsNotSuccessfulDays ()
 
 withSendReAssignedMail (bool $do_it)
 
 withReminderNotRestartedByUserDays (?int $days)
 
 withProcessingEndsNotSuccessfulDays (?int $days)
 
 toFormInput (Field\Factory $input, ilLanguage $ilLng, Refinery $refinery)
 

Detailed Description

Definition at line 24 of file class.ilStudyProgrammeAutoMailSettings.php.

Constructor & Destructor Documentation

◆ __construct()

ilStudyProgrammeAutoMailSettings::__construct ( protected bool  $send_re_assigned_mail,
protected ?int  $reminder_not_restarted_by_user_days,
protected ?int  $processing_ends_not_successful_days 
)

Definition at line 26 of file class.ilStudyProgrammeAutoMailSettings.php.

30 {
31 if (!is_null($reminder_not_restarted_by_user_days) && 1 > $reminder_not_restarted_by_user_days) {
32 throw new InvalidArgumentException('Numbers less than 1 are not allowed');
33 }
34
35 if (!is_null($processing_ends_not_successful_days) && 1 > $processing_ends_not_successful_days) {
36 throw new InvalidArgumentException('Numbers less than 1 are not allowed');
37 }
38
39 $this->send_re_assigned_mail = $send_re_assigned_mail;
40 $this->reminder_not_restarted_by_user_days = $reminder_not_restarted_by_user_days;
41 $this->processing_ends_not_successful_days = $processing_ends_not_successful_days;
42 }

Member Function Documentation

◆ getProcessingEndsNotSuccessfulDays()

ilStudyProgrammeAutoMailSettings::getProcessingEndsNotSuccessfulDays ( )

Definition at line 54 of file class.ilStudyProgrammeAutoMailSettings.php.

54 : ?int
55 {
56 return $this->processing_ends_not_successful_days;
57 }

◆ getReminderNotRestartedByUserDays()

ilStudyProgrammeAutoMailSettings::getReminderNotRestartedByUserDays ( )

Definition at line 49 of file class.ilStudyProgrammeAutoMailSettings.php.

49 : ?int
50 {
51 return $this->reminder_not_restarted_by_user_days;
52 }

◆ getSendReAssignedMail()

ilStudyProgrammeAutoMailSettings::getSendReAssignedMail ( )

Definition at line 44 of file class.ilStudyProgrammeAutoMailSettings.php.

44 : bool
45 {
46 return $this->send_re_assigned_mail;
47 }

◆ toFormInput()

ilStudyProgrammeAutoMailSettings::toFormInput ( Field\Factory  $input,
ilLanguage  $ilLng,
Refinery  $refinery 
)

Definition at line 89 of file class.ilStudyProgrammeAutoMailSettings.php.

90 {
91 $reminder = null;
92 if (!is_null($this->getReminderNotRestartedByUserDays())) {
93 $reminder = [$this->getReminderNotRestartedByUserDays()];
94 }
95
96 $processing_end = null;
97 if (!is_null($this->getProcessingEndsNotSuccessfulDays())) {
98 $processing_end = [$this->getProcessingEndsNotSuccessfulDays()];
99 }
100
101 return $input->section(
102 [
103 "send_re_assigned_mail" => $input->checkbox(
104 $ilLng->txt("send_re_assigned_mail"),
105 $ilLng->txt('send_re_assigned_mail_info')
106 )
107 ->withValue($this->getSendReAssignedMail()),
108
109 "prg_user_not_restarted_time_input" => $input->optionalGroup(
110 [$input->numeric(
111 $ilLng->txt('prg_user_not_restarted_time_input'),
112 $ilLng->txt('prg_user_not_restarted_time_input_info')
113 )->withAdditionalTransformation($refinery->int()->isGreaterThanOrEqual(1))],
114 $ilLng->txt("send_info_to_re_assign_mail"),
115 $ilLng->txt("send_info_to_re_assign_mail_info")
116 )
117 ->withValue($reminder),
118
119 "processing_ends_not_success" => $input->optionalGroup(
120 [$input->numeric(
121 $ilLng->txt('prg_processing_ends_no_success'),
122 $ilLng->txt('prg_processing_ends_no_success_info')
123 )->withAdditionalTransformation($refinery->int()->isGreaterThanOrEqual(1))],
124 $ilLng->txt("send_risky_to_fail_mail"),
125 $ilLng->txt("send_risky_to_fail_mail_info")
126 )
127 ->withValue($processing_end)
128 ],
129 $ilLng->txt("prg_cron_job_configuration")
130 )
131 ->withAdditionalTransformation($refinery->custom()->transformation(function ($vals) {
133 $vals["send_re_assigned_mail"],
134 isset($vals["prg_user_not_restarted_time_input"]) ? (int) $vals["prg_user_not_restarted_time_input"][0] : null,
135 isset($vals["processing_ends_not_success"]) ? (int) $vals["processing_ends_not_success"][0] : null
136 );
137 }));
138 }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
This describes inputs that can be used in forms.
Definition: FormInput.php:33
withAdditionalTransformation(Transformation $trafo)
Apply a transformation to the content of the input.

References ILIAS\UI\examples\Layout\Page\Standard\$refinery, ilLanguage\txt(), and ILIAS\UI\Component\Input\Input\withAdditionalTransformation().

+ Here is the call graph for this function:

◆ withProcessingEndsNotSuccessfulDays()

ilStudyProgrammeAutoMailSettings::withProcessingEndsNotSuccessfulDays ( ?int  $days)

Definition at line 78 of file class.ilStudyProgrammeAutoMailSettings.php.

81 if (!is_null($days) && 1 > $days) {
82 throw new InvalidArgumentException('Numbers less than 1 are not allowed');
83 }
84 $clone = clone $this;
85 $clone->processing_ends_not_successful_days = $days;
86 return $clone;
87 }

◆ withReminderNotRestartedByUserDays()

ilStudyProgrammeAutoMailSettings::withReminderNotRestartedByUserDays ( ?int  $days)

Definition at line 66 of file class.ilStudyProgrammeAutoMailSettings.php.

69 if (!is_null($days) && 1 > $days) {
70 throw new InvalidArgumentException('Numbers less than 1 are not allowed');
71 }
72
73 $clone = clone $this;
74 $clone->reminder_not_restarted_by_user_days = $days;
75 return $clone;
76 }

◆ withSendReAssignedMail()

ilStudyProgrammeAutoMailSettings::withSendReAssignedMail ( bool  $do_it)

Definition at line 59 of file class.ilStudyProgrammeAutoMailSettings.php.

60 {
61 $clone = clone $this;
62 $clone->send_re_assigned_mail = $do_it;
63 return $clone;
64 }

The documentation for this class was generated from the following file: