ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilCourseMailTemplateMemberContext.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 include_once './Services/Mail/classes/class.ilMailTemplateContext.php';
5 
13 {
14  const ID = 'crs_context_member_manual';
15 
19  public function getId()
20  {
21  return self::ID;
22  }
23 
27  public function getTitle()
28  {
29  global $lng;
30 
31  $lng->loadLanguageModule('crs');
32 
33  return $lng->txt('crs_mail_context_member_title');
34  }
35 
39  public function getDescription()
40  {
41  global $lng;
42 
43  $lng->loadLanguageModule('crs');
44 
45  return $lng->txt('crs_mail_context_member_info');
46  }
47 
52  public function getSpecificPlaceholders()
53  {
57  global $lng;
58 
59  $lng->loadLanguageModule('crs');
60 
61  $placeholders = array();
62 
63  $placeholders['crs_title'] = array(
64  'placeholder' => 'COURSE_TITLE',
65  'label' => $lng->txt('crs_title')
66  );
67 
68 
69 
70 
71  $placeholders['crs_link'] = array(
72  'placeholder' => 'COURSE_LINK',
73  'label' => $lng->txt('crs_mail_permanent_link')
74  );
75 
76 
77 
78 
79 
80  return $placeholders;
81  }
82 
86  public function resolveSpecificPlaceholder($placeholder_id, array $context_parameters, ilObjUser $recipient = null, $html_markup = false)
87  {
91  global $ilObjDataCache;
92 
93  if ('crs_title' == $placeholder_id) {
94  return $ilObjDataCache->lookupTitle($ilObjDataCache->lookupObjId($context_parameters['ref_id']));
95  } elseif ('crs_link' == $placeholder_id) {
96  require_once './Services/Link/classes/class.ilLink.php';
97  return ilLink::_getLink($context_parameters['ref_id'], 'crs');
98  }
99 
100  return '';
101  }
102 }
resolveSpecificPlaceholder($placeholder_id, array $context_parameters, ilObjUser $recipient=null, $html_markup=false)
getSpecificPlaceholders()
Return an array of placeholders.
Class ilMailTemplateContext.
Create styles array
The data for the language used.
global $lng
Definition: privfeed.php:17