19 declare(strict_types=1);
37 if (!method_exists($parentGui,
'executeCommand')) {
39 'Parameter $parentGui must be ilCtrlInterface enabled by implementing executeCommand(), %s given.',
53 protected function init(): void
56 $this->
setFormAction($this->
ctrl->getFormAction($this->parentGui, $this->positiveCmd));
58 if ($this->options->maySeeIndividualTransportSettings()) {
60 $this->
lng->txt(
'mail_incoming'),
64 $this->
addItem($incoming_mail_gui);
68 for (
$i = 50;
$i <= 80;
$i++) {
72 $si->setOptions($options);
80 if ($this->
settings->get(
'mail_notification',
'0')) {
82 $this->
lng->txt(
'cron_mail_notification'),
83 'cronjob_notification' 85 $cb->
setInfo($this->
lng->txt(
'mail_cronjob_notification_info'));
93 public function save(): bool
99 if ($this->options->mayModifyIndividualTransportSettings()) {
100 $incoming_type = (
int) $this->
getInput(
'incoming_type');
102 $mail_address_option = $this->options->getEmailAddressMode();
103 switch ($incoming_type) {
105 $mail_address_option = (
int) $this->
getInput(
'mail_address_option');
109 $mail_address_option = (
int) $this->
getInput(
'mail_address_option_both');
113 $incoming_type = $this->options->getIncomingType();
114 $mail_address_option = $this->options->getEmailAddressMode();
117 $this->options->setLinebreak((
int) $this->
getInput(
'linebreak'));
118 $this->options->setSignature($this->
getInput(
'signature'));
119 $this->options->setIsCronJobNotificationStatus((
bool) $this->
getInput(
'cronjob_notification'));
120 $this->options->setIncomingType($incoming_type);
121 $this->options->setEmailAddressMode($mail_address_option);
123 $this->options->updateOptions();
131 'linebreak' => $this->options->getLinebreak(),
132 'signature' => $this->options->getSignature(),
133 'cronjob_notification' => $this->options->isCronJobNotificationEnabled(),
136 if ($this->options->maySeeIndividualTransportSettings()) {
137 $data[
'incoming_type'] = $this->options->getIncomingType();
139 $mail_address_option = $this->options->getEmailAddressMode();
141 $data[
'mail_address_option'] = $mail_address_option;
142 $data[
'mail_address_option_both'] = $mail_address_option;
Class ilMailOptions this class handles user mails.
__construct(Container $dic, ilPlugin $plugin)
This class represents a text area property in a property form.