ILIAS  trunk Revision v11.0_alpha-1749-g1a06bdef097
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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 $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)
 
 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 $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 34 of file class.ilSessionMailTemplateParticipantContext.php.

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

35  {
36  global $DIC;
37 
39 
40  $this->lng = $DIC->language();
41  $this->obj_data_cache = $DIC['ilObjDataCache'];
42  }
global $DIC
Definition: shib_login.php:22
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ getDescription()

ilSessionMailTemplateParticipantContext::getDescription ( )

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

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

57  : string
58  {
59  $lng = $this->lng;
60 
61  $lng->loadLanguageModule('sess');
62  return $lng->txt('sess_mail_context_participant_info');
63  }
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...
loadLanguageModule(string $a_module)
Load language module.
+ Here is the call graph for this function:

◆ getId()

ilSessionMailTemplateParticipantContext::getId ( )

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

44  : string
45  {
46  return self::ID;
47  }

◆ getSpecificPlaceholders()

ilSessionMailTemplateParticipantContext::getSpecificPlaceholders ( )

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

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

65  : array
66  {
67  $lng = $this->lng;
68 
69  $lng->loadLanguageModule('sess');
70  $lng->loadLanguageModule('crs');
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  }
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...
loadLanguageModule(string $a_module)
Load language module.
+ Here is the call graph for this function:

◆ getTitle()

ilSessionMailTemplateParticipantContext::getTitle ( )

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

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

49  : string
50  {
51  $lng = $this->lng;
52 
53  $lng->loadLanguageModule('sess');
54  return $lng->txt('sess_mail_context_participant_title');
55  }
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...
loadLanguageModule(string $a_module)
Load language module.
+ Here is the call graph for this function:

◆ resolveSpecificPlaceholder()

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

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

References $obj_data_cache, ilSessionAppointment\_appointmentToString(), ilSessionAppointment\_lookupAppointment(), ilObjectDataCache\lookupObjId(), and ilObjSession\lookupSession().

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 _lookupAppointment(int $a_obj_id)
static lookupSession(int $a_obj_id)
static _appointmentToString(int $start, int $end, bool $fulltime)
+ Here is the call graph for this function:

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: