5declare(strict_types = 1);
7use \ILIAS\UI\Component\Input\Field;
8use \ILIAS\Refinery\Factory as Refinery;
36 throw new InvalidArgumentException(
37 'Numbers less than 1 are not allowed'
45 throw new InvalidArgumentException(
46 'Numbers less than 1 are not allowed'
73 $clone->send_re_assigned_mail = $do_it;
80 if (!is_null($days) && 1 > $days) {
81 throw new InvalidArgumentException(
82 'Numbers less than 1 are not allowed'
87 $clone->reminder_not_restarted_by_user_days = $days;
94 if (!is_null($days) && 1 > $days) {
95 throw new InvalidArgumentException(
96 'Numbers less than 1 are not allowed'
100 $clone->processing_ends_not_successful_days = $days;
106 return $input->section(
108 "send_re_assigned_mail" => $input->checkbox(
109 $ilLng->
txt(
"send_re_assigned_mail"),
110 $ilLng->
txt(
'send_re_assigned_mail_info')
112 ->withValue($this->getSendReAssignedMail()),
114 "prg_user_not_restarted_time_input" => $input->optionalGroup(
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")
122 ->withValue($this->getReminderNotRestartedByUserDays() !==
null ? [$this->getReminderNotRestartedByUserDays()] :
null),
124 "processing_ends_not_success" => $input->optionalGroup(
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")
132 ->withValue($this->getProcessingEndsNotSuccessfulDays() !==
null ? [$this->getProcessingEndsNotSuccessfulDays()] :
null)
134 $ilLng->
txt(
"prg_cron_job_configuration")
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
An exception for terminatinating execution or to throw for unit testing.
txt($a_topic, $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...
getReminderNotRestartedByUserDays()
$processing_ends_not_successful_days
withSendReAssignedMail(bool $do_it)
withProcessingEndsNotSuccessfulDays(?int $days)
$reminder_not_restarted_by_user_days
__construct(bool $send_re_assigned_mail, ?int $reminder_not_restarted_by_user_days, ?int $processing_ends_not_successful_days)
withReminderNotRestartedByUserDays(?int $days)
toFormInput(Field\Factory $input, \ilLanguage $ilLng, Refinery $refinery)
getProcessingEndsNotSuccessfulDays()
if(!file_exists(getcwd() . '/ilias.ini.php'))
registration confirmation script for ilias