ILIAS  release_8 Revision v8.24
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, bool $html_markup=false)
 
- Public Member Functions inherited from ilMailTemplateContext
 __construct (OrgUnitUserService $orgUnitUserService=null, ilMailEnvironmentHelper $envHelper=null, ilMailUserHelper $usernameHelper=null, ilMailLanguageHelper $languageHelper=null)
 
 getLanguage ()
 
 getId ()
 
 getTitle ()
 
 getDescription ()
 
 getPlaceholders ()
 
 getSpecificPlaceholders ()
 
 resolveSpecificPlaceholder (string $placeholder_id, array $context_parameters, ilObjUser $recipient=null, bool $html_markup=false)
 
 resolvePlaceholder (string $placeholder_id, array $context_parameters, ilObjUser $recipient=null, bool $html_markup=false)
 

Data Fields

const ID = 'sess_context_participant_manual'
 

Protected Attributes

ilLanguage $lng
 
ilObjectDataCache $obj_data_cache
 
- Protected Attributes inherited from ilMailTemplateContext
ilLanguage $language
 
ilMailEnvironmentHelper $envHelper
 
ilMailLanguageHelper $languageHelper
 
ilMailUserHelper $userHelper
 
OrgUnitUserService $orgUnitUserService
 

Additional Inherited Members

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

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilSessionMailTemplateParticipantContext::__construct ( )

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

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

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 58 of file class.ilSessionMailTemplateParticipantContext.php.

58 : string
59 {
61
62 $lng->loadLanguageModule('sess');
63 return $lng->txt('sess_mail_context_participant_info');
64 }
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 45 of file class.ilSessionMailTemplateParticipantContext.php.

References ID.

◆ getSpecificPlaceholders()

ilSessionMailTemplateParticipantContext::getSpecificPlaceholders ( )

Reimplemented from ilMailTemplateContext.

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

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

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

+ Here is the call graph for this function:

◆ getTitle()

ilSessionMailTemplateParticipantContext::getTitle ( )

Reimplemented from ilMailTemplateContext.

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

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

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,
bool  $html_markup = false 
)

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

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