ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilSurveyMailTemplateReminderContext.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 = 'svy_context_rmd';
15 
19  public function getId()
20  {
21  return self::ID;
22  }
23 
27  public function getTitle()
28  {
29  global $lng;
30 
31  $lng->loadLanguageModule('survey');
32 
33  return $lng->txt('svy_mail_context_reminder_title');
34  }
35 
39  public function getDescription()
40  {
41  global $lng;
42 
43  $lng->loadLanguageModule('survey');
44 
45  return $lng->txt('svy_mail_context_reminder_info');
46  }
47 
52  public function getSpecificPlaceholders()
53  {
57  global $lng;
58 
59  $lng->loadLanguageModule('survey');
60 
61  $placeholders = array();
62 
63  $placeholders['svy_title'] = array(
64  'placeholder' => 'SURVEY_TITLE',
65  'label' => $lng->txt('svy_mail_context_reminder_survey_title')
66  );
67 
68  $placeholders['svy_link'] = array(
69  'placeholder' => 'SURVEY_LINK',
70  'label' => $lng->txt('perma_link')
71  );
72 
73  return $placeholders;
74  }
75 
79  public function resolveSpecificPlaceholder($placeholder_id, array $context_parameters, ilObjUser $recipient = null, $html_markup = false)
80  {
84  global $ilObjDataCache;
85 
86  if('svy_title' == $placeholder_id)
87  {
88  return $ilObjDataCache->lookupTitle($ilObjDataCache->lookupObjId($context_parameters['ref_id']));
89  }
90  else if('svy_link' == $placeholder_id)
91  {
92  require_once './Services/Link/classes/class.ilLink.php';
93  return ilLink::_getLink($context_parameters['ref_id'], 'svy');
94  }
95 
96  return '';
97  }
98 }
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