19declare(strict_types=1);
27 protected bool $send_re_assigned_mail,
28 protected ?
int $reminder_not_restarted_by_user_days,
29 protected ?
int $processing_ends_not_successful_days
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');
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');
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;
46 return $this->send_re_assigned_mail;
51 return $this->reminder_not_restarted_by_user_days;
56 return $this->processing_ends_not_successful_days;
62 $clone->send_re_assigned_mail = $do_it;
69 if (!is_null($days) && 1 > $days) {
70 throw new InvalidArgumentException(
'Numbers less than 1 are not allowed');
74 $clone->reminder_not_restarted_by_user_days = $days;
81 if (!is_null($days) && 1 > $days) {
82 throw new InvalidArgumentException(
'Numbers less than 1 are not allowed');
85 $clone->processing_ends_not_successful_days = $days;
92 if (!is_null($this->getReminderNotRestartedByUserDays())) {
93 $reminder = [$this->getReminderNotRestartedByUserDays()];
96 $processing_end =
null;
97 if (!is_null($this->getProcessingEndsNotSuccessfulDays())) {
98 $processing_end = [$this->getProcessingEndsNotSuccessfulDays()];
101 return $input->section(
103 "send_re_assigned_mail" => $input->checkbox(
104 $ilLng->
txt(
"send_re_assigned_mail"),
105 $ilLng->
txt(
'send_re_assigned_mail_info')
107 ->withValue($this->getSendReAssignedMail()),
109 "prg_user_not_restarted_time_input" => $input->optionalGroup(
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")
117 ->withValue($reminder),
119 "processing_ends_not_success" => $input->optionalGroup(
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")
127 ->withValue($processing_end)
129 $ilLng->
txt(
"prg_cron_job_configuration")
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
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...
getReminderNotRestartedByUserDays()
withSendReAssignedMail(bool $do_it)
toFormInput(Field\Factory $input, ilLanguage $ilLng, Refinery $refinery)
withProcessingEndsNotSuccessfulDays(?int $days)
__construct(protected bool $send_re_assigned_mail, protected ?int $reminder_not_restarted_by_user_days, protected ?int $processing_ends_not_successful_days)
withReminderNotRestartedByUserDays(?int $days)
getProcessingEndsNotSuccessfulDays()
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.
if(!file_exists('../ilias.ini.php'))