ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
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

bool $send_re_assigned_mail
 
int $reminder_not_restarted_by_user_days
 
int $processing_ends_not_successful_days
 

Detailed Description

Definition at line 24 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 30 of file class.ilStudyProgrammeAutoMailSettings.php.

References $processing_ends_not_successful_days, $reminder_not_restarted_by_user_days, and $send_re_assigned_mail.

34  {
36  throw new InvalidArgumentException('Numbers less than 1 are not allowed');
37  }
38 
40  throw new InvalidArgumentException('Numbers less than 1 are not allowed');
41  }
42 
43  $this->send_re_assigned_mail = $send_re_assigned_mail;
44  $this->reminder_not_restarted_by_user_days = $reminder_not_restarted_by_user_days;
45  $this->processing_ends_not_successful_days = $processing_ends_not_successful_days;
46  }

Member Function Documentation

◆ getProcessingEndsNotSuccessfulDays()

ilStudyProgrammeAutoMailSettings::getProcessingEndsNotSuccessfulDays ( )

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

References $processing_ends_not_successful_days.

Referenced by toFormInput().

+ Here is the caller graph for this function:

◆ getReminderNotRestartedByUserDays()

ilStudyProgrammeAutoMailSettings::getReminderNotRestartedByUserDays ( )

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

References $reminder_not_restarted_by_user_days.

Referenced by toFormInput().

+ Here is the caller graph for this function:

◆ getSendReAssignedMail()

ilStudyProgrammeAutoMailSettings::getSendReAssignedMail ( )

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

References $send_re_assigned_mail.

Referenced by toFormInput().

+ Here is the caller graph for this function:

◆ toFormInput()

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

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

References getProcessingEndsNotSuccessfulDays(), getReminderNotRestartedByUserDays(), getSendReAssignedMail(), ilLanguage\txt(), ILIAS\UI\Implementation\Component\Input\ViewControl\withAdditionalTransformation(), and ILIAS\UI\Implementation\Component\Input\withValue().

94  {
95  $reminder = null;
96  if (!is_null($this->getReminderNotRestartedByUserDays())) {
97  $reminder = [$this->getReminderNotRestartedByUserDays()];
98  }
99 
100  $processing_end = null;
101  if (!is_null($this->getProcessingEndsNotSuccessfulDays())) {
102  $processing_end = [$this->getProcessingEndsNotSuccessfulDays()];
103  }
104 
105  return $input->section(
106  [
107  "send_re_assigned_mail" => $input->checkbox(
108  $ilLng->txt("send_re_assigned_mail"),
109  $ilLng->txt('send_re_assigned_mail_info')
110  )
111  ->withValue($this->getSendReAssignedMail()),
112 
113  "prg_user_not_restarted_time_input" => $input->optionalGroup(
114  [$input->numeric(
115  $ilLng->txt('prg_user_not_restarted_time_input'),
116  $ilLng->txt('prg_user_not_restarted_time_input_info')
117  )->withAdditionalTransformation($refinery->int()->isGreaterThanOrEqual(1))],
118  $ilLng->txt("send_info_to_re_assign_mail"),
119  $ilLng->txt("send_info_to_re_assign_mail_info")
120  )
121  ->withValue($reminder),
122 
123  "processing_ends_not_success" => $input->optionalGroup(
124  [$input->numeric(
125  $ilLng->txt('prg_processing_ends_no_success'),
126  $ilLng->txt('prg_processing_ends_no_success_info')
127  )->withAdditionalTransformation($refinery->int()->isGreaterThanOrEqual(1))],
128  $ilLng->txt("send_risky_to_fail_mail"),
129  $ilLng->txt("send_risky_to_fail_mail_info")
130  )
131  ->withValue($processing_end)
132  ],
133  $ilLng->txt("prg_cron_job_configuration")
134  )
135  ->withAdditionalTransformation($refinery->custom()->transformation(function ($vals) {
137  $vals["send_re_assigned_mail"],
138  isset($vals["prg_user_not_restarted_time_input"]) ? (int) $vals["prg_user_not_restarted_time_input"][0] : null,
139  isset($vals["processing_ends_not_success"]) ? (int) $vals["processing_ends_not_success"][0] : null
140  );
141  }));
142  }
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...
withValue($value)
Get an input like this with another value displayed on the client side.
Definition: Group.php:59
This describes inputs that can be used in forms.
Definition: FormInput.php:31
Refinery Factory $refinery
+ Here is the call graph for this function:

◆ withProcessingEndsNotSuccessfulDays()

ilStudyProgrammeAutoMailSettings::withProcessingEndsNotSuccessfulDays ( ?int  $days)

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

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

◆ withReminderNotRestartedByUserDays()

ilStudyProgrammeAutoMailSettings::withReminderNotRestartedByUserDays ( ?int  $days)

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

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

◆ withSendReAssignedMail()

ilStudyProgrammeAutoMailSettings::withSendReAssignedMail ( bool  $do_it)

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

64  {
65  $clone = clone $this;
66  $clone->send_re_assigned_mail = $do_it;
67  return $clone;
68  }

Field Documentation

◆ $processing_ends_not_successful_days

int ilStudyProgrammeAutoMailSettings::$processing_ends_not_successful_days
protected

◆ $reminder_not_restarted_by_user_days

int ilStudyProgrammeAutoMailSettings::$reminder_not_restarted_by_user_days
protected

◆ $send_re_assigned_mail

bool ilStudyProgrammeAutoMailSettings::$send_re_assigned_mail
protected

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