19declare(strict_types=1);
38 return 'new_mail_notification';
43 $settings = new \ilSetting();
46 $settings->get(
'mail_notification') ===
'1' &&
47 $settings->get(
'show_mail_settings') ===
'1';
52 return $lng->txt(
'cron_mail_notification');
57 return AvailablePages::MainSettings;
62 return AvailableSections::Communication;
66 FieldFactory $field_factory,
72 $lng->loadLanguageModule(
'mail');
74 return $field_factory->checkbox(
76 $lng->txt(
'mail_cronjob_notification_info')
87 $lng->loadLanguageModule(
'mail');
89 $input = new \ilCheckboxInputGUI($this->
getLabel($lng));
90 $input->setInfo(
$lng->txt(
'mail_cronjob_notification_info'));
92 $user !==
null && $this->retrieveValueFromUser($user)
94 $input->setValue(
'1');
110 $value = $this->retrieveValueFromUser($user);
111 return $value !==
false;
119 $mail_options = $this->mailOptionsFor($user);
120 $mail_options->setIsCronJobNotificationStatus($input ===
true || $input ===
'1');
121 $mail_options->updateOptions();
128 return $this->mailOptionsFor($user)->isCronJobNotificationEnabled();
133 if (!\array_key_exists($user->
getId(), $this->mail_options_by_user)) {
134 $this->mail_options_by_user[$user->
getId()] = new \ilMailOptions($user->
getId());
137 return $this->mail_options_by_user[$user->
getId()];
retrieveValueFromUser(\ilObjUser $user)
hasUserPersonalizedSetting(\ilSetting $settings, \ilObjUser $user)
getDefaultValueForDisplay(Language $lng, \ilSetting $settings)
array $mail_options_by_user
mailOptionsFor(\ilObjUser $user)
persistUserInput(\ilObjUser $user, mixed $input, ?\ilPropertyFormGUI $form=null)
isAvailable()
If this function returns false the setting will not be shown, even if it's PropertyAttributes would a...
getLegacyInput(Language $lng, \ilSetting $settings, ?\ilObjUser $user=null)
You don't need to add a post_var to the input as the User will handle this for you,...
getInput(FieldFactory $field_factory, Language $lng, Refinery $refinery, \ilSetting $settings, ?\ilObjUser $user=null)
return['delivery_method'=> 'php',]
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...