ILIAS  release_7 Revision v7.30-3-g800a261c036
ilStudyProgrammeAutoMailSettings Class Reference
+ Collaboration diagram for ilStudyProgrammeAutoMailSettings:

Public Member Functions

 __construct (bool $send_re_assigned_mail, ?int $reminder_not_restarted_by_user_days, ?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)
 

Protected Attributes

 $send_re_assigned_mail
 
 $reminder_not_restarted_by_user_days
 
 $processing_ends_not_successful_days
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

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

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

31 {
32 if (
35 ) {
36 throw new InvalidArgumentException(
37 'Numbers less than 1 are not allowed'
38 );
39 }
40
41 if (
44 ) {
45 throw new InvalidArgumentException(
46 'Numbers less than 1 are not allowed'
47 );
48 }
49
50 $this->send_re_assigned_mail = $send_re_assigned_mail;
51 $this->reminder_not_restarted_by_user_days = $reminder_not_restarted_by_user_days;
52 $this->processing_ends_not_successful_days = $processing_ends_not_successful_days;
53 }

References $processing_ends_not_successful_days, $reminder_not_restarted_by_user_days, and $send_re_assigned_mail.

Member Function Documentation

◆ getProcessingEndsNotSuccessfulDays()

ilStudyProgrammeAutoMailSettings::getProcessingEndsNotSuccessfulDays ( )

◆ getReminderNotRestartedByUserDays()

ilStudyProgrammeAutoMailSettings::getReminderNotRestartedByUserDays ( )

◆ getSendReAssignedMail()

ilStudyProgrammeAutoMailSettings::getSendReAssignedMail ( )

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

55 : bool
56 {
58 }

References $send_re_assigned_mail.

◆ toFormInput()

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

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

104 : Field\Input
105 {
106 return $input->section(
107 [
108 "send_re_assigned_mail" => $input->checkbox(
109 $ilLng->txt("send_re_assigned_mail"),
110 $ilLng->txt('send_re_assigned_mail_info')
111 )
112 ->withValue($this->getSendReAssignedMail()),
113
114 "prg_user_not_restarted_time_input" => $input->optionalGroup(
115 [$input->numeric(
116 $ilLng->txt('prg_user_not_restarted_time_input'),
117 $ilLng->txt('prg_user_not_restarted_time_input_info')
118 )->withAdditionalTransformation($refinery->int()->isGreaterThan(0))],
119 $ilLng->txt("send_info_to_re_assign_mail"),
120 $ilLng->txt("send_info_to_re_assign_mail_info")
121 )
122 ->withValue($this->getReminderNotRestartedByUserDays() !== null ? [$this->getReminderNotRestartedByUserDays()] : null),
123
124 "processing_ends_not_success" => $input->optionalGroup(
125 [$input->numeric(
126 $ilLng->txt('prg_processing_ends_no_success'),
127 $ilLng->txt('prg_processing_ends_no_success_info')
128 )->withAdditionalTransformation($refinery->int()->isGreaterThan(0))],
129 $ilLng->txt("send_risky_to_fail_mail"),
130 $ilLng->txt("send_risky_to_fail_mail_info")
131 )
132 ->withValue($this->getProcessingEndsNotSuccessfulDays() !== null ? [$this->getProcessingEndsNotSuccessfulDays()] : null)
133 ],
134 $ilLng->txt("prg_cron_job_configuration")
135 )
136 ->withAdditionalTransformation($refinery->custom()->transformation(function ($vals) {
137 return new \ilStudyProgrammeAutoMailSettings(
138 $vals["send_re_assigned_mail"],
139 isset($vals["prg_user_not_restarted_time_input"]) ? (int) $vals["prg_user_not_restarted_time_input"][0] : null,
140 isset($vals["processing_ends_not_success"]) ? (int) $vals["processing_ends_not_success"][0] : null
141 );
142 }));
143 }

References ilLanguage\txt(), and ILIAS\UI\Component\Input\Field\Input\withAdditionalTransformation().

+ Here is the call graph for this function:

◆ withProcessingEndsNotSuccessfulDays()

ilStudyProgrammeAutoMailSettings::withProcessingEndsNotSuccessfulDays ( ?int  $days)

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

94 if (!is_null($days) && 1 > $days) {
95 throw new InvalidArgumentException(
96 'Numbers less than 1 are not allowed'
97 );
98 }
99 $clone = clone $this;
100 $clone->processing_ends_not_successful_days = $days;
101 return $clone;
102 }

◆ withReminderNotRestartedByUserDays()

ilStudyProgrammeAutoMailSettings::withReminderNotRestartedByUserDays ( ?int  $days)

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

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

◆ withSendReAssignedMail()

ilStudyProgrammeAutoMailSettings::withSendReAssignedMail ( bool  $do_it)

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

71 {
72 $clone = clone $this;
73 $clone->send_re_assigned_mail = $do_it;
74 return $clone;
75 }

Field Documentation

◆ $processing_ends_not_successful_days

ilStudyProgrammeAutoMailSettings::$processing_ends_not_successful_days
protected

◆ $reminder_not_restarted_by_user_days

ilStudyProgrammeAutoMailSettings::$reminder_not_restarted_by_user_days
protected

◆ $send_re_assigned_mail

ilStudyProgrammeAutoMailSettings::$send_re_assigned_mail
protected

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