ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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.

Referenced by toFormInput().

54  : ?int
55  {
56  return $this->processing_ends_not_successful_days;
57  }
+ Here is the caller graph for this function:

◆ getReminderNotRestartedByUserDays()

ilStudyProgrammeAutoMailSettings::getReminderNotRestartedByUserDays ( )

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

Referenced by toFormInput().

49  : ?int
50  {
51  return $this->reminder_not_restarted_by_user_days;
52  }
+ Here is the caller graph for this function:

◆ getSendReAssignedMail()

ilStudyProgrammeAutoMailSettings::getSendReAssignedMail ( )

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

Referenced by toFormInput().

44  : bool
45  {
46  return $this->send_re_assigned_mail;
47  }
+ Here is the caller graph for this function:

◆ toFormInput()

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

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

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

89  : \ILIAS\UI\Component\Input\Container\Form\FormInput
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...
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
withValue($value)
Get an input like this with another value displayed on the client side.
Definition: Group.php:61
+ 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: