ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilSessionMailTemplateParticipantContext Class Reference
+ Inheritance diagram for ilSessionMailTemplateParticipantContext:
+ Collaboration diagram for ilSessionMailTemplateParticipantContext:

Public Member Functions

 __construct ()
 
 getId ()
 
 getTitle ()
 
 getDescription ()
 
 getSpecificPlaceholders ()
 
 resolveSpecificPlaceholder (string $placeholder_id, array $context_parameters, ?ilObjUser $recipient=null)
 
- Public Member Functions inherited from ilMailTemplateContext
 __construct (?OrgUnitUserService $org_unit_user_service=null, ?ilMailEnvironmentHelper $environment_helper=null, ?ilMailUserHelper $user_helper=null, ?ilMailLanguageHelper $language_helper=null)
 
 getLanguage ()
 
 getId ()
 
 getTitle ()
 
 getDescription ()
 
 getNestedPlaceholders ()
 
 getPlaceholders ()
 
 getSpecificPlaceholders ()
 
 resolveSpecificPlaceholder (string $placeholder_id, array $context_parameters, ?ilObjUser $recipient=null)
 
 resolvePlaceholder (string $placeholder_id, array $context_parameters, ?ilObjUser $recipient=null)
 

Data Fields

const ID = 'sess_context_participant_manual'
 

Protected Attributes

ilLanguage $lng
 
ilObjectDataCache $obj_data_cache
 
- Protected Attributes inherited from ilMailTemplateContext
ilLanguage $language
 
ilMailEnvironmentHelper $env_helper
 
ilMailLanguageHelper $language_helper
 
ilMailUserHelper $user_helper
 
OrgUnitUserService $org_unit_user_service
 

Additional Inherited Members

- Protected Member Functions inherited from ilMailTemplateContext
 initLanguage (ilObjUser $user)
 
 initLanguageByIso2Code (string $iso_code)
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilSessionMailTemplateParticipantContext::__construct ( )

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

35 {
36 global $DIC;
37
39
40 $this->lng = $DIC->language();
41 $this->obj_data_cache = $DIC['ilObjDataCache'];
42 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

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

+ Here is the call graph for this function:

Member Function Documentation

◆ getDescription()

ilSessionMailTemplateParticipantContext::getDescription ( )

Reimplemented from ilMailTemplateContext.

Definition at line 57 of file class.ilSessionMailTemplateParticipantContext.php.

57 : string
58 {
60
61 $lng->loadLanguageModule('sess');
62 return $lng->txt('sess_mail_context_participant_info');
63 }
loadLanguageModule(string $a_module)
Load language module.
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...

References $lng, ilLanguage\loadLanguageModule(), and ilLanguage\txt().

+ Here is the call graph for this function:

◆ getId()

ilSessionMailTemplateParticipantContext::getId ( )

Reimplemented from ilMailTemplateContext.

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

References ID.

◆ getSpecificPlaceholders()

ilSessionMailTemplateParticipantContext::getSpecificPlaceholders ( )
Returns
array<string, array{placeholder: string, crs_period_end_mail_placeholder: string}>

Reimplemented from ilMailTemplateContext.

Definition at line 65 of file class.ilSessionMailTemplateParticipantContext.php.

65 : array
66 {
68
69 $lng->loadLanguageModule('sess');
71
72 $placeholders = [];
73 $placeholders['sess_title'] = [
74 'placeholder' => 'SESS_TITLE',
75 'label' => $lng->txt('sess_title')
76 ];
77
78 $placeholders['sess_appointment'] = [
79 'placeholder' => 'SESS_APPOINTMENT',
80 'label' => $lng->txt('event_date_time')
81 ];
82
83 $placeholders['sess_location'] = [
84 'placeholder' => 'SESS_LOCATION',
85 'label' => $lng->txt('event_location')
86 ];
87
88 $placeholders['sess_details'] = [
89 'placeholder' => 'SESS_DETAILS',
90 'label' => $lng->txt('event_details_workflow')
91 ];
92
93 return $placeholders;
94 }

References $lng, ilLanguage\loadLanguageModule(), and ilLanguage\txt().

+ Here is the call graph for this function:

◆ getTitle()

ilSessionMailTemplateParticipantContext::getTitle ( )

Reimplemented from ilMailTemplateContext.

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

49 : string
50 {
52
53 $lng->loadLanguageModule('sess');
54 return $lng->txt('sess_mail_context_participant_title');
55 }

References $lng, ilLanguage\loadLanguageModule(), and ilLanguage\txt().

+ Here is the call graph for this function:

◆ resolveSpecificPlaceholder()

ilSessionMailTemplateParticipantContext::resolveSpecificPlaceholder ( string  $placeholder_id,
array  $context_parameters,
?ilObjUser  $recipient = null 
)
Parameters
array<string,mixed>$context_parameters

Reimplemented from ilMailTemplateContext.

Definition at line 96 of file class.ilSessionMailTemplateParticipantContext.php.

100 : string {
101 $ilObjDataCache = $this->obj_data_cache;
102 $obj_id = $ilObjDataCache->lookupObjId((int) $context_parameters['ref_id']);
103 $sess_data = ilObjSession::lookupSession($obj_id);
104 $sess_app = ilSessionAppointment::_lookupAppointment($obj_id);
105
106 switch ($placeholder_id) {
107 case 'sess_title':
108 return $ilObjDataCache->lookupTitle($obj_id);
109 case 'sess_appointment':
110 return ilSessionAppointment::_appointmentToString($sess_app['start'], $sess_app['end'], (bool) $sess_app['fullday']);
111 case 'sess_location':
112 return $sess_data['location'];
113 case 'sess_details':
114 return $sess_data['details'];
115 }
116
117 return '';
118 }
static lookupSession(int $a_obj_id)
static _lookupAppointment(int $a_obj_id)
static _appointmentToString(int $start, int $end, bool $fulltime)

Field Documentation

◆ $lng

ilLanguage ilSessionMailTemplateParticipantContext::$lng
protected

◆ $obj_data_cache

ilObjectDataCache ilSessionMailTemplateParticipantContext::$obj_data_cache
protected

◆ ID

const ilSessionMailTemplateParticipantContext::ID = 'sess_context_participant_manual'

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