ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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
4include_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 {
95 return $ilObjDataCache->lookupTitle($ilObjDataCache->lookupObjId($context_parameters['ref_id']));
96 }
97 else if('crs_link' == $placeholder_id)
98 {
99 require_once './Services/Link/classes/class.ilLink.php';
100 return ilLink::_getLink($context_parameters['ref_id'], 'crs');
101 }
102
103 return '';
104 }
105}
Class ilMailTemplateContext.
getSpecificPlaceholders()
Return an array of placeholders.
resolveSpecificPlaceholder($placeholder_id, array $context_parameters, ilObjUser $recipient=null, $html_markup=false)
global $lng
Definition: privfeed.php:40