ILIAS  trunk Revision v12.0_alpha-1227-g7ff6d300864
ilObjMailGUI Class Reference

@ilCtrl_Calls ilObjMailGUI: ilPermissionGUI More...

+ Inheritance diagram for ilObjMailGUI:
+ Collaboration diagram for ilObjMailGUI:

Public Member Functions

 __construct ($a_data, int $a_id, bool $a_call_by_reference)
 
 executeCommand ()
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 saveObject ()
 
- Public Member Functions inherited from ilObjectGUI
 getRefId ()
 
 setAdminMode (string $mode)
 
 getAdminMode ()
 
 getObject ()
 
 executeCommand ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode (bool $mode=true)
 If true, a creation screen is displayed the current [ref_id] does belong to the parent class The mode is determined in ilRepositoryGUI. More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 editAvailabilityPeriodObject ()
 
 saveAvailabilityPeriodObject ()
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 
 getDidacticTemplateVar (string $type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $obj, ?int $parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 
 addExternalEditFormCustom (ilPropertyFormGUI $form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction (string $cmd, string $default_form_action="")
 Get form action for command (command is method name without "Object", e.g. More...
 
 isVisible (int $ref_id, string $type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Static Public Member Functions

static _goto (string $target)
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot (bool $raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode (int $ref_id, string $cmd="")
 
static _gotoSharedWorkspaceNode (int $wsp_id)
 

Protected Member Functions

 getTabs ()
 @abstract overwrite in derived GUI class of your object type More...
 
 buildSettingsSubTabs (string $active_sub_tab)
 
 showGeneralSettingsForm (?ilPropertyFormGUI $form=null)
 
 getGeneralSettingsForm ()
 
 populateGeneralSettingsForm (ilPropertyFormGUI $form)
 
 showExternalSettingsFormObject (?ilPropertyFormGUI $form=null)
 
 sendTestUserMailObject ()
 
 sendTestSystemMailObject ()
 
 sendTestMail (bool $is_manual_mail=false)
 
 getExternalSettingsForm ()
 
 populateExternalSettingsForm (ilPropertyFormGUI $form)
 
 saveExternalSettingsFormObject ()
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 createActionDispatcherGUI ()
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction (?ilObjectListGUI $list_gui=null)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 setTabs ()
 set admin tabs More...
 
 setAdminTabs ()
 set admin tabs More...
 
 setLocator ()
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator (bool $omit=true)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 getCreationFormsHTML (StandardForm|ilPropertyFormGUI|array $form)
 
 getTitleForCreationFormPage ()
 
 getCreationFormTitle ()
 
 initCreateForm (string $new_type)
 
 didacticTemplatesToForm ()
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 retrieveAdditionalDidacticTemplateOptions ()
 
 addAdoptContentLinkToToolbar ()
 
 addImportButtonToToolbar ()
 
 addAvailabilityPeriodButtonToToolbar (ilToolbarGUI $toolbar)
 
 parseDidacticTemplateVar (string $var, string $type)
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 routeImportCmdObject ()
 
 importFile (string $file_to_import, string $path_to_uploaded_file_in_temp_dir)
 
 deleteUploadedImportFile (string $path_to_uploaded_file_in_temp_dir)
 
 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
 setFormAction (string $cmd, string $form_action)
 
 getReturnLocation (string $cmd, string $default_location="")
 Get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 getTargetFrame (string $cmd, string $default_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 getTabs ()
 @abstract overwrite in derived GUI class of your object type More...
 
 redirectToRefId (int $ref_id, string $cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current ["ref_id"] value of the request More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 getCreatableObjectTypes ()
 
 buildAddNewItemElements (array $subtypes, string $create_target_class=ilRepositoryGUI::class, ?int $redirect_target_ref_id=null,)
 
 buildGroup (string $create_target_class, array $obj_types_in_group, string $title, array $subtypes)
 

Private Member Functions

 isEditingAllowed ()
 
 isViewAllowed ()
 
 isPermissionChangeAllowed ()
 
 buildSignaturePlaceholderInputs (Signature $signature)
 
 getAvailableSignatures ()
 

Private Attributes

const string SETTINGS_SUB_TAB_ID_GENERAL = 'settings_general'
 
const string SETTINGS_SUB_TAB_ID_EXTERNAL = 'settings_external'
 
const string PASSWORD_PLACE_HOLDER = '***********************'
 
readonly ilTabsGUI $tabs
 
readonly TemplateEngineFactoryInterface $template_engine_factory
 
readonly MailSignatureService $mail_signature_service
 

Additional Inherited Members

- Data Fields inherited from ilObjectGUI
const ADMIN_MODE_NONE = ""
 
const ADMIN_MODE_SETTINGS = "settings"
 
const ADMIN_MODE_REPOSITORY = "repository"
 
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 
const SUPPORTED_IMPORT_MIME_TYPES = [MimeType::APPLICATION__ZIP, MimeType::APPLICATION__X_ZIP_COMPRESSED]
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
GlobalHttpState $http
 
ServerRequestInterface $request
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilSetting $settings
 
ilToolbarGUI $toolbar
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
ilObjectService $object_service
 
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 
ilCtrl $ctrl
 
ilErrorHandling $error
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ILIAS $ilias
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Refinery $refinery
 
ilFavouritesManager $favourites
 
CustomIconFactory $custom_icon_factory
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
Filesystem $temp_file_system
 
ilObject $object = null
 
bool $creation_mode = false
 
 $data
 
int $id
 
bool $call_by_reference = false
 
bool $prepare_output
 
int $ref_id
 
int $obj_id
 
int $maxcount
 
array $form_action = []
 
array $return_location = []
 
array $target_frame = []
 
string $tmp_import_dir
 
string $sub_objects = ""
 
bool $omit_locator = false
 
string $type = ""
 
string $admin_mode = self::ADMIN_MODE_NONE
 
int $requested_ref_id = 0
 
int $requested_crtptrefid = 0
 
int $requested_crtcb = 0
 
string $requested_new_type = ""
 
string $link_params
 
string $html = ""
 

Detailed Description

@ilCtrl_Calls ilObjMailGUI: ilPermissionGUI

Definition at line 31 of file class.ilObjMailGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilObjMailGUI::__construct (   $a_data,
int  $a_id,
bool  $a_call_by_reference 
)

Definition at line 41 of file class.ilObjMailGUI.php.

42 {
43 global $DIC;
44 $this->type = 'mail';
45 parent::__construct($a_data, $a_id, $a_call_by_reference, false);
46
47 $this->tabs = $DIC->tabs();
48 $this->template_engine_factory = $DIC->mail()->templateEngineFactory();
49 $this->mail_signature_service = $DIC->mail()->signature();
50
51 $this->lng->loadLanguageModule('mail');
52 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\lng(), and ILIAS\Repository\tabs().

+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilObjMailGUI::_goto ( string  $target)
static

Definition at line 737 of file class.ilObjMailGUI.php.

737 : void
738 {
739 global $DIC;
740 $main_tpl = $DIC->ui()->mainTemplate();
741
742 $mail = new ilMail($DIC->user()->getId());
743
744 if ($DIC->rbac()->system()->checkAccess('internal_mail', $mail->getMailObjectReferenceId())) {
745 $DIC->ctrl()->redirectToURL('ilias.php?baseClass=ilMailGUI');
746 } elseif ($DIC->access()->checkAccess('read', '', ROOT_FOLDER_ID)) {
747 $main_tpl->setOnScreenMessage('failure', sprintf(
748 $DIC->language()->txt('msg_no_perm_read_item'),
750 ), true);
751
752 $DIC->ctrl()->setTargetScript('ilias.php');
753 $DIC->ctrl()->setParameterByClass(ilRepositoryGUI::class, 'ref_id', ROOT_FOLDER_ID);
754 $DIC->ctrl()->redirectByClass(ilRepositoryGUI::class);
755 }
756
757 $DIC['ilErr']->raiseError($DIC->language()->txt('msg_no_perm_read'), $DIC['ilErr']->FATAL);
758 }
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)
const ROOT_FOLDER_ID
Definition: constants.php:32

References $DIC, ilObject\_lookupObjId(), ilObject\_lookupTitle(), and ROOT_FOLDER_ID.

+ Here is the call graph for this function:

◆ buildSettingsSubTabs()

ilObjMailGUI::buildSettingsSubTabs ( string  $active_sub_tab)
protected

Definition at line 144 of file class.ilObjMailGUI.php.

144 : void
145 {
146 if ($this->isViewAllowed()) {
147 $this->tabs->addSubTab(
148 self::SETTINGS_SUB_TAB_ID_GENERAL,
149 $this->lng->txt('mail_settings_general_tab'),
150 $this->ctrl->getLinkTarget($this, 'view')
151 );
152
153 if ($this->settings->get('mail_allow_external', '0')) {
154 $this->tabs->addSubTab(
155 self::SETTINGS_SUB_TAB_ID_EXTERNAL,
156 $this->lng->txt('mail_settings_external_tab'),
157 $this->ctrl->getLinkTarget($this, 'showExternalSettingsForm')
158 );
159 }
160
161 $this->tabs->activateSubTab($active_sub_tab);
162 }
163 }

References isViewAllowed(), ILIAS\Repository\lng(), ILIAS\Repository\settings(), and ILIAS\Repository\tabs().

Referenced by showExternalSettingsFormObject(), and showGeneralSettingsForm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildSignaturePlaceholderInputs()

ilObjMailGUI::buildSignaturePlaceholderInputs ( Signature  $signature)
private
Returns
ilFormPropertyGUI[]

Definition at line 574 of file class.ilObjMailGUI.php.

574 : array
575 {
576 $signature_input = new ilTextAreaInputGUI(
577 $this->lng->txt($signature->getPersistenceIdentifier()),
578 $signature->getPersistenceIdentifier()
579 );
580 $signature_input->setRows(8);
581 $signature_input->setDisabled(!$this->isEditingAllowed());
582
583 $placeholder_input = new ilManualPlaceholderInputGUI(
584 $this->lng->txt('mail_form_placeholders_label'),
585 'm_placeholders',
586 $signature->getPersistenceIdentifier(),
587 );
588 $placeholder_input->setDisabled(!$this->isEditingAllowed());
589
590 $placeholder = $this->mail_signature_service->getPlaceholder();
591 do {
592 if ($signature->supports($placeholder)) {
593 $placeholder_input->addPlaceholder($placeholder->getId(), $placeholder->getLabel());
594 }
595 } while ($placeholder = $placeholder->getNext());
596
597 return [$signature_input, $placeholder_input];
598 }
This class represents a text area property in a property form.
supports(Placeholder $placeholder)

References ILIAS\Mail\Signature\Signature\getPersistenceIdentifier(), isEditingAllowed(), ILIAS\Repository\lng(), and ILIAS\Mail\Signature\Signature\supports().

Referenced by getExternalSettingsForm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilObjMailGUI::executeCommand ( )

Reimplemented from ilObjectGUI.

Definition at line 54 of file class.ilObjMailGUI.php.

54 : void
55 {
56 $next_class = $this->ctrl->getNextClass($this) ?? '';
57 $cmd = $this->ctrl->getCmd();
58 $this->prepareOutput();
59
60 switch (strtolower($next_class)) {
61 case strtolower(ilPermissionGUI::class):
62 $perm_gui = new ilPermissionGUI($this);
63 $this->ctrl->forwardCommand($perm_gui);
64 break;
65
66 case strtolower(ilMailTemplateGUI::class):
67 if (!$this->isViewAllowed()) {
68 $this->ilias->raiseError(
69 $this->lng->txt('msg_no_perm_write'),
70 $this->ilias->error_obj->WARNING
71 );
72 }
73
74 $this->ctrl->forwardCommand(new ilMailTemplateGUI($this->object));
75 break;
76
77 default:
78 if (!$cmd) {
79 $cmd = 'view';
80 }
81 $cmd .= 'Object';
82 $this->$cmd();
83 break;
84 }
85 }
@ilCtrl_isCalledBy ilMailTemplateGUI: ilObjMailGUI
prepareOutput(bool $show_sub_objects=true)
Class ilObjForumAdministration.
if(!file_exists('../ilias.ini.php'))

References ILIAS\Repository\ctrl(), isViewAllowed(), ILIAS\Repository\lng(), and ilObjectGUI\prepareOutput().

+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjMailGUI::getAdminTabs ( )

administration tabs show only permissions and trash folder

Reimplemented from ilObjectGUI.

Definition at line 102 of file class.ilObjMailGUI.php.

102 : void
103 {
104 $this->getTabs();
105 }
getTabs()
@abstract overwrite in derived GUI class of your object type

References getTabs().

+ Here is the call graph for this function:

◆ getAvailableSignatures()

ilObjMailGUI::getAvailableSignatures ( )
private
Returns
Signature[]

Definition at line 763 of file class.ilObjMailGUI.php.

References ILIAS\Repository\settings().

Referenced by getExternalSettingsForm(), and populateExternalSettingsForm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getExternalSettingsForm()

ilObjMailGUI::getExternalSettingsForm ( )
protected

Definition at line 398 of file class.ilObjMailGUI.php.

399 {
400 $form = new ilPropertyFormGUI();
401
402 $form->setFormAction($this->ctrl->getFormAction($this, 'saveExternalSettingsForm'));
403 $form->setTitle($this->lng->txt('mail_settings_external_frm_head'));
404
405 $smtp = new ilCheckboxInputGUI($this->lng->txt('mail_smtp_status'), 'mail_smtp_status');
406 $smtp->setInfo($this->lng->txt('mail_smtp_status_info'));
407 $smtp->setValue('1');
408 $smtp->setDisabled(!$this->isEditingAllowed());
409 $form->addItem($smtp);
410
411 $host = new ilTextInputGUI($this->lng->txt('mail_smtp_host'), 'mail_smtp_host');
412 $host->setInfo($this->lng->txt('mail_smtp_host_info'));
413 $host->setRequired(true);
414 $host->setDisabled(!$this->isEditingAllowed());
415 $smtp->addSubItem($host);
416
417 $port = new ilNumberInputGUI($this->lng->txt('mail_smtp_port'), 'mail_smtp_port');
418 $port->setInfo($this->lng->txt('mail_smtp_port_info'));
419 $port->allowDecimals(false);
420 $port->setMinValue(0);
421 $port->setMinValue(0);
422 $port->setRequired(true);
423 $port->setDisabled(!$this->isEditingAllowed());
424 $smtp->addSubItem($port);
425
426 $encryption = new ilSelectInputGUI(
427 $this->lng->txt('mail_smtp_encryption'),
428 'mail_smtp_encryption'
429 );
430 $encryption_options = [
431 '' => $this->lng->txt('please_choose'),
432 'tls' => $this->lng->txt('mail_smtp_encryption_tls'),
433 'ssl' => $this->lng->txt('mail_smtp_encryption_ssl'),
434 ];
435
436 $encryption->setOptions($encryption_options);
437 $encryption->setDisabled(!$this->isEditingAllowed());
438 $smtp->addSubItem($encryption);
439
440 $user = new ilTextInputGUI($this->lng->txt('mail_smtp_user'), 'mail_smtp_user');
441 $user->setDisabled(!$this->isEditingAllowed());
442 $user->setDisableHtmlAutoComplete(true);
443 $smtp->addSubItem($user);
444
445 $password = new ilPasswordInputGUI(
446 $this->lng->txt('mail_smtp_password'),
447 'mail_smtp_password'
448 );
449 $password->setRetype(false);
450 $password->setSkipSyntaxCheck(true);
451 $password->setDisabled(!$this->isEditingAllowed());
452 $password->setDisableHtmlAutoComplete(true);
453 $smtp->addSubItem($password);
454
455 $pre = new ilTextInputGUI($this->lng->txt('mail_subject_prefix'), 'mail_subject_prefix');
456 $pre->setSize(12);
457 $pre->setMaxLength(32);
458 $pre->setInfo($this->lng->txt('mail_subject_prefix_info'));
459 $pre->setDisabled(!$this->isEditingAllowed());
460 $form->addItem($pre);
461
462 $send_html = new ilCheckboxInputGUI($this->lng->txt('mail_send_html'), 'mail_send_html');
463 $send_html->setInfo($this->lng->txt('mail_send_html_info'));
464 $send_html->setValue('1');
465 $send_html->setDisabled(!$this->isEditingAllowed());
466 $form->addItem($send_html);
467
468 $sh = new ilFormSectionHeaderGUI();
469 $sh->setTitle($this->lng->txt('mail_settings_user_frm_head'));
470 $form->addItem($sh);
471
472 $user_from_address = new ilEMailInputGUI(
473 $this->lng->txt('mail_system_usr_from_addr'),
474 'mail_system_usr_from_addr'
475 );
476 $user_from_address->setInfo($this->lng->txt('mail_system_usr_from_addr_info'));
477 $user_from_address->setRequired(true);
478 $user_from_address->setDisabled(!$this->isEditingAllowed());
479 $form->addItem($user_from_address);
480
481 $use_global_reply_to_address = new ilCheckboxInputGUI(
482 $this->lng->txt('mail_use_global_reply_to_addr'),
483 'use_global_reply_to_addr'
484 );
485 $use_global_reply_to_address->setInfo($this->lng->txt('mail_use_global_reply_to_addr_info'));
486 $use_global_reply_to_address->setValue('1');
487 $use_global_reply_to_address->setDisabled(!$this->isEditingAllowed());
488 $form->addItem($use_global_reply_to_address);
489 $global_reply_to = new ilEMailInputGUI(
490 $this->lng->txt('mail_global_reply_to_addr'),
491 'global_reply_to_addr'
492 );
493 $global_reply_to->setInfo($this->lng->txt('mail_global_reply_to_addr_info'));
494 $global_reply_to->setRequired(true);
495 $global_reply_to->setDisabled(!$this->isEditingAllowed());
496 $use_global_reply_to_address->addSubItem($global_reply_to);
497
498 $user_from_name = new ilTextInputGUI(
499 $this->lng->txt('mail_system_usr_from_name'),
500 'mail_system_usr_from_name'
501 );
502 $user_from_name->setInfo($this->lng->txt('mail_system_usr_from_name_info'));
503 $user_from_name->setRequired(true);
504 $user_from_name->setDisabled(!$this->isEditingAllowed());
505 $form->addItem($user_from_name);
506
507 $user_envelope_from_addr = new ilEMailInputGUI(
508 $this->lng->txt('mail_system_usr_env_from_addr'),
509 'mail_system_usr_env_from_addr'
510 );
511 $user_envelope_from_addr->setInfo($this->lng->txt('mail_system_usr_env_from_addr_info'));
512 $user_envelope_from_addr->setDisabled(!$this->isEditingAllowed());
513 $form->addItem($user_envelope_from_addr);
514
515 [$user_signature_inputs, $installation_signature_inputs] = array_map(
516 fn(Signature $signature): array => $this->buildSignaturePlaceholderInputs($signature),
518 );
519 foreach ($user_signature_inputs as $user_signature_input) {
520 $form->addItem($user_signature_input);
521 }
522
523 $sh = new ilFormSectionHeaderGUI();
524 $sh->setTitle($this->lng->txt('mail_settings_system_frm_head'));
525 $form->addItem($sh);
526
527 $system_from_addr = new ilEMailInputGUI(
528 $this->lng->txt('mail_system_sys_from_addr'),
529 'mail_system_sys_from_addr'
530 );
531 $system_from_addr->setInfo($this->lng->txt('mail_system_sys_from_addr_info'));
532 $system_from_addr->setRequired(true);
533 $system_from_addr->setDisabled(!$this->isEditingAllowed());
534 $form->addItem($system_from_addr);
535
536 $system_from_name = new ilTextInputGUI(
537 $this->lng->txt('mail_system_sys_from_name'),
538 'mail_system_sys_from_name'
539 );
540 $system_from_name->setRequired(true);
541 $system_from_name->setDisabled(!$this->isEditingAllowed());
542 $form->addItem($system_from_name);
543
544 $system_reply_to_addr = new ilEMailInputGUI(
545 $this->lng->txt('mail_system_sys_reply_to_addr'),
546 'mail_system_sys_reply_to_addr'
547 );
548 $system_reply_to_addr->setRequired(true);
549 $system_reply_to_addr->setDisabled(!$this->isEditingAllowed());
550 $form->addItem($system_reply_to_addr);
551
552 $system_return_path = new ilEMailInputGUI(
553 $this->lng->txt('mail_system_sys_env_from_addr'),
554 'mail_system_sys_env_from_addr'
555 );
556 $system_return_path->setInfo($this->lng->txt('mail_system_sys_env_from_addr_info'));
557 $system_return_path->setDisabled(!$this->isEditingAllowed());
558 $form->addItem($system_return_path);
559
560 foreach ($installation_signature_inputs as $installation_signature_input) {
561 $form->addItem($installation_signature_input);
562 }
563
564 if ($this->isEditingAllowed()) {
565 $form->addCommandButton('saveExternalSettingsForm', $this->lng->txt('save'));
566 }
567
568 return $form;
569 }
This class represents a checkbox property in a property form.
This class represents a email property in a property form.
This class represents a section header in a property form.
This class represents a number property in a property form.
buildSignaturePlaceholderInputs(Signature $signature)
This class represents a password property in a property form.
This class represents a property form user interface.
This class represents a selection list property in a property form.
This class represents a text property in a property form.

References ilObjectGUI\$user, buildSignaturePlaceholderInputs(), ILIAS\Repository\ctrl(), getAvailableSignatures(), isEditingAllowed(), and ILIAS\Repository\lng().

Referenced by saveExternalSettingsFormObject(), and showExternalSettingsFormObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getGeneralSettingsForm()

ilObjMailGUI::getGeneralSettingsForm ( )
protected

Definition at line 186 of file class.ilObjMailGUI.php.

187 {
188 $form = new ilPropertyFormGUI();
189
190 $form->setFormAction($this->ctrl->getFormAction($this, 'save'));
191 $form->setTitle($this->lng->txt('general_settings'));
192
193 $cb = new ilCheckboxInputGUI($this->lng->txt('mail_allow_external'), 'mail_allow_external');
194 $cb->setInfo($this->lng->txt('mail_allow_external_info'));
195 $cb->setValue('1');
196 $cb->setDisabled(!$this->isEditingAllowed());
197 $form->addItem($cb);
198
199 $incoming_mail_gui = new ilIncomingMailInputGUI(
200 $this->lng->txt('mail_incoming'),
201 'incoming_type'
202 );
203 $incoming_mail_gui->setDisabled(!$this->isEditingAllowed());
204 $this->ctrl->setParameterByClass(ilObjUserFolderGUI::class, 'ref_id', USER_FOLDER_ID);
205 $this->ctrl->clearParametersByClass(ilObjUserFolderGUI::class);
206 $form->addItem($incoming_mail_gui);
207
208 $show_mail_settings_gui = new ilCheckboxInputGUI(
209 $this->lng->txt('show_mail_settings'),
210 'show_mail_settings'
211 );
212 $show_mail_settings_gui->setInfo($this->lng->txt('show_mail_settings_info'));
213 $show_mail_settings_gui->setValue('1');
214 $form->addItem($show_mail_settings_gui);
215
216 $ti = new ilNumberInputGUI($this->lng->txt('mail_maxsize_attach'), 'mail_maxsize_attach');
217 $ti->setSuffix($this->lng->txt('kb'));
218 $ti->setInfo($this->lng->txt('mail_max_size_attachments_total'));
219 $ti->setMaxLength(10);
220 $ti->setSize(10);
221 $ti->setDisabled(!$this->isEditingAllowed());
222 $form->addItem($ti);
223
224 $mn = new ilFormSectionHeaderGUI();
225 $mn->setTitle($this->lng->txt('mail_member_notification'));
226 $form->addItem($mn);
227
228 $cron_mail = new ilSelectInputGUI(
229 $this->lng->txt('cron_mail_notification'),
230 'mail_notification'
231 );
232 $cron_options = [
233 0 => $this->lng->txt('cron_mail_notification_never'),
234 1 => $this->lng->txt('cron_mail_notification_cron'),
235 ];
236 $cron_mail->setOptions($cron_options);
237 $cron_mail->setInfo(sprintf(
238 $this->lng->txt('cron_mail_notification_desc'),
239 $this->lng->txt('mail_allow_external')
240 ));
241 $cron_mail->setDisabled(!$this->isEditingAllowed());
242 $form->addItem($cron_mail);
243
246 $form,
247 $this
248 );
249
250 $mn = new ilFormSectionHeaderGUI();
251 $mn->setTitle($this->lng->txt('mail_auto_responder'));
252 $form->addItem($mn);
253
254 $input = new ilNumberInputGUI($this->lng->txt('mail_auto_responder_idle_time'), 'mail_auto_responder_idle_time');
255 $input->setMinValue(1);
256 $input->allowDecimals(false);
257 $input->setInfo($this->lng->txt('mail_auto_responder_idle_time_info'));
258 $input->setSuffix($this->lng->txt('days'));
259 $input->setDisabled(!$this->isEditingAllowed());
260 $input->setSize(5);
261 $form->addItem($input);
262
263 if ($this->isEditingAllowed()) {
264 $form->addCommandButton('save', $this->lng->txt('save'));
265 }
266
267 return $form;
268 }
static addFieldsToForm(int $a_form_id, ilPropertyFormGUI $a_form, ilObjectGUI $a_parent_gui)
const USER_FOLDER_ID
Definition: constants.php:33

References ilAdministrationSettingsFormHandler\addFieldsToForm(), ILIAS\Repository\ctrl(), ilAdministrationSettingsFormHandler\FORM_MAIL, isEditingAllowed(), ILIAS\Repository\lng(), and USER_FOLDER_ID.

Referenced by saveObject(), and showGeneralSettingsForm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTabs()

ilObjMailGUI::getTabs ( )
protected

@abstract overwrite in derived GUI class of your object type

Reimplemented from ilObjectGUI.

Definition at line 107 of file class.ilObjMailGUI.php.

107 : void
108 {
109 if ($this->isViewAllowed()) {
110 $this->tabs->addTarget(
111 'settings',
112 $this->ctrl->getLinkTarget($this, 'view'),
113 [
114 'view',
115 'save',
116 '',
117 'showExternalSettingsForm',
118 'saveExternalSettingsForm',
119 'sendTestUserMail',
120 'sendTestSystemMail',
121 ]
122 );
123 }
124
125 if ($this->isViewAllowed()) {
126 $this->tabs->addTarget(
127 'mail_templates',
128 $this->ctrl->getLinkTargetByClass(ilMailTemplateGUI::class, 'showTemplates'),
129 '',
130 ilMailTemplateGUI::class
131 );
132 }
133
134 if ($this->isPermissionChangeAllowed()) {
135 $this->tabs->addTarget(
136 'perm_settings',
137 $this->ctrl->getLinkTargetByClass([static::class, ilPermissionGUI::class], 'perm'),
138 ['perm', 'info', 'owner'],
139 ilPermissionGUI::class
140 );
141 }
142 }

References ILIAS\Repository\ctrl(), isPermissionChangeAllowed(), isViewAllowed(), and ILIAS\Repository\tabs().

Referenced by getAdminTabs().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isEditingAllowed()

ilObjMailGUI::isEditingAllowed ( )
private

Definition at line 87 of file class.ilObjMailGUI.php.

87 : bool
88 {
89 return $this->rbac_system->checkAccess('write', $this->object->getRefId());
90 }

References ILIAS\Repository\object().

Referenced by buildSignaturePlaceholderInputs(), getExternalSettingsForm(), getGeneralSettingsForm(), saveExternalSettingsFormObject(), and saveObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isPermissionChangeAllowed()

ilObjMailGUI::isPermissionChangeAllowed ( )
private

Definition at line 97 of file class.ilObjMailGUI.php.

97 : bool
98 {
99 return $this->rbac_system->checkAccess('edit_permission', $this->object->getRefId());
100 }

References ILIAS\Repository\object().

Referenced by getTabs().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isViewAllowed()

ilObjMailGUI::isViewAllowed ( )
private

Definition at line 92 of file class.ilObjMailGUI.php.

92 : bool
93 {
94 return $this->rbac_system->checkAccess('read', $this->object->getRefId());
95 }

References ILIAS\Repository\object().

Referenced by buildSettingsSubTabs(), executeCommand(), getTabs(), sendTestMail(), showExternalSettingsFormObject(), and showGeneralSettingsForm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateExternalSettingsForm()

ilObjMailGUI::populateExternalSettingsForm ( ilPropertyFormGUI  $form)
protected

Definition at line 600 of file class.ilObjMailGUI.php.

600 : void
601 {
602 $subject_prefix = $this->settings->get('mail_subject_prefix');
603 if ($subject_prefix === null) {
604 $subject_prefix = ilMimeMail::MAIL_SUBJECT_PREFIX;
605 }
606
607 [$user_signature, $installation_signature] = $this->getAvailableSignatures();
608
609 $form->setValuesByArray([
610 'mail_smtp_status' => (bool) $this->settings->get('mail_smtp_status', '0'),
611 'mail_smtp_host' => $this->settings->get('mail_smtp_host', ''),
612 'mail_smtp_port' => $this->settings->get('mail_smtp_port', ''),
613 'mail_smtp_user' => $this->settings->get('mail_smtp_user', ''),
614 'mail_smtp_password' => $this->settings->get('mail_smtp_password') !== '' ?
615 self::PASSWORD_PLACE_HOLDER :
616 '',
617 'mail_smtp_encryption' => $this->settings->get('mail_smtp_encryption', ''),
618 'mail_subject_prefix' => $subject_prefix,
619 'mail_send_html' => (bool) $this->settings->get('mail_send_html', '1'),
620 'mail_system_usr_from_addr' => $this->settings->get('mail_system_usr_from_addr', ''),
621 'mail_system_usr_from_name' => $this->settings->get('mail_system_usr_from_name', ''),
622 'mail_system_usr_env_from_addr' => $this->settings->get('mail_system_usr_env_from_addr', ''),
623 'mail_system_sys_from_addr' => $this->settings->get('mail_system_sys_from_addr', ''),
624 'mail_system_sys_from_name' => $this->settings->get('mail_system_sys_from_name', ''),
625 $user_signature->getPersistenceIdentifier() => $this->settings->get($user_signature->getPersistenceIdentifier(), ''),
626 'mail_system_sys_reply_to_addr' => $this->settings->get('mail_system_sys_reply_to_addr', ''),
627 'mail_system_sys_env_from_addr' => $this->settings->get('mail_system_sys_env_from_addr', ''),
628 $installation_signature->getPersistenceIdentifier() => $this->settings->get($installation_signature->getPersistenceIdentifier(), ''),
629 'use_global_reply_to_addr' => (bool) $this->settings->get('use_global_reply_to_addr', '0'),
630 'global_reply_to_addr' => $this->settings->get('global_reply_to_addr', ''),
631 ]);
632 }
final const string MAIL_SUBJECT_PREFIX
setValuesByArray(array $a_values, bool $a_restrict_to_value_keys=false)

References getAvailableSignatures(), ilMimeMail\MAIL_SUBJECT_PREFIX, ILIAS\Repository\settings(), and ilPropertyFormGUI\setValuesByArray().

Referenced by showExternalSettingsFormObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populateGeneralSettingsForm()

ilObjMailGUI::populateGeneralSettingsForm ( ilPropertyFormGUI  $form)
protected

Definition at line 270 of file class.ilObjMailGUI.php.

270 : void
271 {
272 $form->setValuesByArray([
273 'mail_allow_external' => (bool) $this->settings->get('mail_allow_external', '0'),
274 'incoming_type' => (string) $this->settings->get('mail_incoming_mail', '0'),
275 'mail_address_option' => $this->settings->get('mail_address_option', '') !== '' ?
276 $this->settings->get('mail_address_option') :
278 'mail_address_option_both' => $this->settings->get('mail_address_option', '') !== '' ?
279 $this->settings->get('mail_address_option') :
281 'show_mail_settings' => (bool) $this->settings->get('show_mail_settings', '0'),
282 'mail_maxsize_attach' => $this->settings->get('mail_maxsize_attach', ''),
283 'mail_notification' => $this->settings->get('mail_notification', ''),
284 'mail_auto_responder_idle_time' => is_numeric($this->settings->get('mail_auto_responder_idle_time', (string) AutoresponderService::AUTO_RESPONDER_DEFAULT_IDLE_TIME)) ?
285 (string) $this->settings->get('mail_auto_responder_idle_time', '3') :
286 '',
287 ]);
288 }
final const int FIRST_EMAIL

References ilMailOptions\FIRST_EMAIL, ILIAS\Repository\settings(), and ilPropertyFormGUI\setValuesByArray().

Referenced by showGeneralSettingsForm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveExternalSettingsFormObject()

ilObjMailGUI::saveExternalSettingsFormObject ( )
protected

Definition at line 634 of file class.ilObjMailGUI.php.

634 : void
635 {
636 if (!$this->isEditingAllowed()) {
637 $this->ilias->raiseError($this->lng->txt('msg_no_perm_write'), $this->ilias->error_obj->WARNING);
638 }
639
640 $form = $this->getExternalSettingsForm();
641 $is_form_valid = $form->checkInput();
642
643 if (!$is_form_valid) {
644 $form->setValuesByPost();
645 $this->showExternalSettingsFormObject($form);
646 return;
647 }
648
649 $is_smtp_enabled = (bool) $form->getInput('mail_smtp_status');
650 if ($is_smtp_enabled && $form->getInput('mail_smtp_user') &&
651 !$form->getInput('mail_smtp_password')
652 ) {
653 $form->getItemByPostVar('mail_smtp_password')->setRequired(true);
654 $form->getItemByPostVar('mail_smtp_password')
655 ->setAlert($this->lng->txt('mail_smtp_password_req'));
656 $form->setValuesByPost();
657 $this->showExternalSettingsFormObject($form);
658 return;
659 }
660
661 // If all forms in ILIAS use the UI/KS forms (here and in Services/Mail), we should move this to a proper constraint/trafo
662 $is_valid_template_syntax = $this->refinery->custom()->constraint(function ($value): bool {
663 try {
664 $this->template_engine_factory->getBasicEngine()->render((string) $value, []);
665 return true;
666 } catch (Exception) {
667 return false;
668 }
669 }, $this->lng->txt('mail_template_invalid_tpl_syntax'));
670
671 $valid_templates = true;
672 $availabe_signatures = array_map(
673 static fn(Signature $signature): string => $signature->getPersistenceIdentifier(),
674 $this->getAvailableSignatures()
675 );
676 foreach (
677 ['mail_system_usr_from_name', ...$availabe_signatures] as $template
678 ) {
679 try {
680 $is_valid_template_syntax->check((string) $form->getInput($template));
681 } catch (Exception) {
682 $form->getItemByPostVar($template)->setAlert(
683 $is_valid_template_syntax->problemWith((string) $form->getInput($template))
684 );
685 $valid_templates = false;
686 }
687 }
688 if (!$valid_templates) {
689 $form->setValuesByPost();
690 $this->showExternalSettingsFormObject($form);
691 return;
692 }
693
694 $this->settings->set('mail_smtp_status', (string) ((int) $form->getInput('mail_smtp_status')));
695 $this->settings->set('mail_smtp_host', (string) $form->getInput('mail_smtp_host'));
696 $this->settings->set('mail_smtp_port', (string) ((int) $form->getInput('mail_smtp_port')));
697 $this->settings->set('mail_smtp_user', (string) $form->getInput('mail_smtp_user'));
698 if ($form->getInput('mail_smtp_password') !== self::PASSWORD_PLACE_HOLDER) {
699 $this->settings->set('mail_smtp_password', (string) $form->getInput('mail_smtp_password'));
700 }
701 $this->settings->set('mail_smtp_encryption', (string) $form->getInput('mail_smtp_encryption'));
702 $this->settings->set('mail_send_html', (string) $form->getInput('mail_send_html'));
703 $this->settings->set('mail_subject_prefix', (string) $form->getInput('mail_subject_prefix'));
704 $this->settings->set('mail_system_usr_from_addr', (string) $form->getInput('mail_system_usr_from_addr'));
705 $this->settings->set('mail_system_usr_from_name', (string) $form->getInput('mail_system_usr_from_name'));
706 $this->settings->set(
707 'mail_system_usr_env_from_addr',
708 (string) $form->getInput('mail_system_usr_env_from_addr')
709 );
710 $this->settings->set(
711 'mail_system_sys_from_addr',
712 (string) $form->getInput('mail_system_sys_from_addr')
713 );
714 $this->settings->set('mail_system_sys_from_name', (string) $form->getInput('mail_system_sys_from_name'));
715 $this->settings->set(
716 'mail_system_sys_reply_to_addr',
717 (string) $form->getInput('mail_system_sys_reply_to_addr')
718 );
719 $this->settings->set(
720 'mail_system_sys_env_from_addr',
721 (string) $form->getInput('mail_system_sys_env_from_addr')
722 );
723 $this->settings->set('use_global_reply_to_addr', (string) ((int) $form->getInput('use_global_reply_to_addr')));
724 $this->settings->set('global_reply_to_addr', (string) $form->getInput('global_reply_to_addr'));
725
726 foreach ($availabe_signatures as $availabe_signature) {
727 $this->settings->set(
728 $availabe_signature,
729 (string) $form->getInput($availabe_signature)
730 );
731 }
732
733 $this->tpl->setOnScreenMessage('success', $this->lng->txt('saved_successfully'), true);
734 $this->ctrl->redirect($this, 'showExternalSettingsForm');
735 }
showExternalSettingsFormObject(?ilPropertyFormGUI $form=null)

References ILIAS\Repository\ctrl(), getExternalSettingsForm(), ILIAS\Mail\Signature\Signature\getPersistenceIdentifier(), isEditingAllowed(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), ILIAS\Repository\settings(), and showExternalSettingsFormObject().

+ Here is the call graph for this function:

◆ saveObject()

ilObjMailGUI::saveObject ( )

Reimplemented from ilObjectGUI.

Definition at line 290 of file class.ilObjMailGUI.php.

290 : void
291 {
292 if (!$this->isEditingAllowed()) {
293 $this->ilias->raiseError($this->lng->txt('msg_no_perm_write'), $this->ilias->error_obj->WARNING);
294 }
295
296 $form = $this->getGeneralSettingsForm();
297 if ($form->checkInput()) {
298 $incoming_type = (int) $form->getInput('incoming_type');
299
300 $mail_address_option = ilMailOptions::FIRST_EMAIL;
301 if ($incoming_type === ilMailOptions::INCOMING_EMAIL) {
302 $mail_address_option = (int) $form->getInput('mail_address_option');
303 } elseif ($incoming_type === ilMailOptions::INCOMING_BOTH) {
304 $mail_address_option = (int) $form->getInput('mail_address_option_both');
305 }
306
307 $this->settings->set('mail_allow_external', (string) ((int) $form->getInput('mail_allow_external')));
308 $this->settings->set('mail_incoming_mail', (string) $incoming_type);
309 $this->settings->set('show_mail_settings', (string) ((int) $form->getInput('show_mail_settings')));
310 $this->settings->set('mail_address_option', (string) $mail_address_option);
311 $this->settings->set('mail_maxsize_attach', (string) $form->getInput('mail_maxsize_attach'));
312 $this->settings->set('mail_notification', (string) ((int) $form->getInput('mail_notification')));
313 $this->settings->set('mail_auto_responder_idle_time', (string) $form->getInput('mail_auto_responder_idle_time'));
314
315 $this->tpl->setOnScreenMessage('success', $this->lng->txt('saved_successfully'), true);
316 $this->ctrl->redirect($this);
317 }
318
319 $form->setValuesByPost();
320 $this->showGeneralSettingsForm($form);
321 }
final const int INCOMING_BOTH
final const int INCOMING_EMAIL
showGeneralSettingsForm(?ilPropertyFormGUI $form=null)

References ILIAS\Repository\ctrl(), ilMailOptions\FIRST_EMAIL, getGeneralSettingsForm(), ilMailOptions\INCOMING_BOTH, ilMailOptions\INCOMING_EMAIL, ILIAS\Repository\int(), isEditingAllowed(), ILIAS\Repository\lng(), ILIAS\Repository\settings(), and showGeneralSettingsForm().

+ Here is the call graph for this function:

◆ sendTestMail()

ilObjMailGUI::sendTestMail ( bool  $is_manual_mail = false)
protected

Definition at line 360 of file class.ilObjMailGUI.php.

360 : void
361 {
362 if (!$this->isViewAllowed()) {
363 $this->ilias->raiseError($this->lng->txt('msg_no_perm_write'), $this->ilias->error_obj->WARNING);
364 }
365
366 if ($this->user->getEmail() === '') {
368 return;
369 }
370
371 if ($is_manual_mail) {
372 $mail = new ilMail($this->user->getId());
373 } else {
374 $mail = new ilMail(ANONYMOUS_USER_ID);
375 }
376
377 $mail->setSaveInSentbox(false);
378 $mail->appendInstallationSignature(!$is_manual_mail);
379
380 $lng_variable_prefix = 'sys';
381 if ($is_manual_mail) {
382 $lng_variable_prefix = 'usr';
383 }
384
385 $mail->enqueue(
386 $this->user->getEmail(),
387 '',
388 '',
389 $this->lng->txt('mail_email_' . $lng_variable_prefix . '_subject'),
390 $this->lng->txt('mail_email_' . $lng_variable_prefix . '_body'),
391 []
392 );
393
394 $this->tpl->setOnScreenMessage('success', $this->lng->txt('mail_external_test_sent'));
396 }
const ANONYMOUS_USER_ID
Definition: constants.php:27

References ANONYMOUS_USER_ID, isViewAllowed(), ILIAS\Repository\lng(), showExternalSettingsFormObject(), and ILIAS\Repository\user().

Referenced by sendTestSystemMailObject(), and sendTestUserMailObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sendTestSystemMailObject()

ilObjMailGUI::sendTestSystemMailObject ( )
protected

Definition at line 355 of file class.ilObjMailGUI.php.

355 : void
356 {
357 $this->sendTestMail();
358 }
sendTestMail(bool $is_manual_mail=false)

References sendTestMail().

+ Here is the call graph for this function:

◆ sendTestUserMailObject()

ilObjMailGUI::sendTestUserMailObject ( )
protected

Definition at line 350 of file class.ilObjMailGUI.php.

350 : void
351 {
352 $this->sendTestMail(true);
353 }

References sendTestMail().

+ Here is the call graph for this function:

◆ showExternalSettingsFormObject()

ilObjMailGUI::showExternalSettingsFormObject ( ?ilPropertyFormGUI  $form = null)
protected

Definition at line 323 of file class.ilObjMailGUI.php.

323 : void
324 {
325 if (!$this->isViewAllowed()) {
326 $this->ilias->raiseError($this->lng->txt('msg_no_perm_write'), $this->ilias->error_obj->WARNING);
327 }
328
329 $this->buildSettingsSubTabs(self::SETTINGS_SUB_TAB_ID_EXTERNAL);
330
331 if ($form === null) {
332 $form = $this->getExternalSettingsForm();
333 $this->populateExternalSettingsForm($form);
334 }
335
336 if ($this->user->getEmail() !== '') {
337 $this->toolbar->addComponent($this->ui_factory->button()->standard(
338 $this->lng->txt('mail_external_send_test_usr'),
339 $this->ctrl->getLinkTarget($this, 'sendTestUserMail')
340 ));
341 $this->toolbar->addComponent($this->ui_factory->button()->standard(
342 $this->lng->txt('mail_external_send_test_sys'),
343 $this->ctrl->getLinkTarget($this, 'sendTestSystemMail')
344 ));
345 }
346
347 $this->tpl->setContent($form->getHTML());
348 }
buildSettingsSubTabs(string $active_sub_tab)
populateExternalSettingsForm(ilPropertyFormGUI $form)

References buildSettingsSubTabs(), getExternalSettingsForm(), isViewAllowed(), ILIAS\Repository\lng(), populateExternalSettingsForm(), ILIAS\Repository\toolbar(), and ILIAS\Repository\user().

Referenced by saveExternalSettingsFormObject(), and sendTestMail().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showGeneralSettingsForm()

ilObjMailGUI::showGeneralSettingsForm ( ?ilPropertyFormGUI  $form = null)
protected

Definition at line 170 of file class.ilObjMailGUI.php.

170 : void
171 {
172 if (!$this->isViewAllowed()) {
173 $this->ilias->raiseError($this->lng->txt('msg_no_perm_write'), $this->ilias->error_obj->WARNING);
174 }
175
176 $this->buildSettingsSubTabs(self::SETTINGS_SUB_TAB_ID_GENERAL);
177
178 if ($form === null) {
179 $form = $this->getGeneralSettingsForm();
180 $this->populateGeneralSettingsForm($form);
181 }
182
183 $this->tpl->setContent($form->getHTML());
184 }
populateGeneralSettingsForm(ilPropertyFormGUI $form)

References buildSettingsSubTabs(), getGeneralSettingsForm(), isViewAllowed(), ILIAS\Repository\lng(), and populateGeneralSettingsForm().

Referenced by saveObject(), and viewObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ viewObject()

ilObjMailGUI::viewObject ( )

viewObject container presentation for "administration -> repository, trash, permissions"

Reimplemented from ilObjectGUI.

Definition at line 165 of file class.ilObjMailGUI.php.

165 : void
166 {
168 }

References showGeneralSettingsForm().

+ Here is the call graph for this function:

Field Documentation

◆ $mail_signature_service

readonly MailSignatureService ilObjMailGUI::$mail_signature_service
private

Definition at line 39 of file class.ilObjMailGUI.php.

◆ $tabs

readonly ilTabsGUI ilObjMailGUI::$tabs
private

Definition at line 37 of file class.ilObjMailGUI.php.

◆ $template_engine_factory

readonly TemplateEngineFactoryInterface ilObjMailGUI::$template_engine_factory
private

Definition at line 38 of file class.ilObjMailGUI.php.

◆ PASSWORD_PLACE_HOLDER

const string ilObjMailGUI::PASSWORD_PLACE_HOLDER = '***********************'
private

Definition at line 35 of file class.ilObjMailGUI.php.

◆ SETTINGS_SUB_TAB_ID_EXTERNAL

const string ilObjMailGUI::SETTINGS_SUB_TAB_ID_EXTERNAL = 'settings_external'
private

Definition at line 34 of file class.ilObjMailGUI.php.

◆ SETTINGS_SUB_TAB_ID_GENERAL

const string ilObjMailGUI::SETTINGS_SUB_TAB_ID_GENERAL = 'settings_general'
private

Definition at line 33 of file class.ilObjMailGUI.php.


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