ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilExcMailTemplatePeerReminderContext Class Reference
+ Inheritance diagram for ilExcMailTemplatePeerReminderContext:
+ Collaboration diagram for ilExcMailTemplatePeerReminderContext:

Public Member Functions

 __construct ()
 Constructor. More...
 
 getId ()
 
 getTitle ()
 
 getDescription ()
 
 getSpecificPlaceholders ()
 Return an array of placeholders. More...
 
 resolveSpecificPlaceholder ($placeholder_id, array $context_parameters, ilObjUser $recipient=null, $html_markup=false)
 {} More...
 
- Public Member Functions inherited from ilMailTemplateContext
 getLanguage ()
 
 setLanguage ($language)
 
 getId ()
 Returns a unique (in the context of mail template contexts) id. More...
 
 getTitle ()
 Returns a translated title (depending on the current language) which is displayed in the user interface. More...
 
 getDescription ()
 Returns a translated description (depending on the current language) which is displayed in the user interface. More...
 
 getPlaceholders ()
 Return an array of placeholders. More...
 
 getSpecificPlaceholders ()
 Return an array of placeholders. More...
 
 resolveSpecificPlaceholder ($placeholder_id, array $context_parameters, ilObjUser $recipient=null, $html_markup=false)
 
 resolvePlaceholder ($placeholder_id, array $context_parameters, ilObjUser $recipient=null, $html_markup=false)
 

Data Fields

const ID = 'exc_context_peer_rmd'
 

Protected Attributes

 $lng
 
 $obj_data_cache
 
- Protected Attributes inherited from ilMailTemplateContext
 $language
 

Additional Inherited Members

- Protected Member Functions inherited from ilMailTemplateContext
 initLanguage (ilObjUser $user)
 
 initLanguageByIso2Code ($a_code)
 Init language by ISO2 code. More...
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilExcMailTemplatePeerReminderContext::__construct ( )

Constructor.

Definition at line 29 of file class.ilExcMailTemplatePeerReminderContext.php.

References $DIC.

30  {
31  global $DIC;
32 
33  $this->lng = $DIC->language();
34  if (isset($DIC["ilObjDataCache"])) {
35  $this->obj_data_cache = $DIC["ilObjDataCache"];
36  }
37  }
global $DIC
Definition: saml.php:7

Member Function Documentation

◆ getDescription()

ilExcMailTemplatePeerReminderContext::getDescription ( )
Returns
string

Definition at line 64 of file class.ilExcMailTemplatePeerReminderContext.php.

References $lng.

65  {
66  $lng = $this->lng;
67 
68  $lng->loadLanguageModule('exc');
69 
70  return $lng->txt('exc_mail_context_peer_reminder_info');
71  }

◆ getId()

ilExcMailTemplatePeerReminderContext::getId ( )
Returns
string

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

45  {
46  return self::ID;
47  }

◆ getSpecificPlaceholders()

ilExcMailTemplatePeerReminderContext::getSpecificPlaceholders ( )

Return an array of placeholders.

Returns
array

Definition at line 77 of file class.ilExcMailTemplatePeerReminderContext.php.

References $lng.

78  {
79  $lng = $this->lng;
80  $lng->loadLanguageModule('exc');
81 
82  $placeholders = array();
83 
84  $placeholders['ass_title'] = array(
85  'placeholder' => 'ASSIGNMENT_TITLE',
86  'label' => $lng->txt('exc_mail_context_reminder_assignment_title')
87  );
88  $placeholders['exc_title'] = array(
89  'placeholder' => 'EXERCISE_TITLE',
90  'label' => $lng->txt('exc_mail_context_reminder_exercise_title')
91  );
92 
93  $placeholders['ass_link'] = array(
94  'placeholder' => 'ASSIGNMENT_LINK',
95  'label' => $lng->txt('perma_link')
96  );
97 
98  return $placeholders;
99  }

◆ getTitle()

ilExcMailTemplatePeerReminderContext::getTitle ( )
Returns
string

Definition at line 52 of file class.ilExcMailTemplatePeerReminderContext.php.

References $lng.

53  {
54  $lng = $this->lng;
55 
56  $lng->loadLanguageModule('exc');
57 
58  return $lng->txt('exc_mail_context_peer_reminder_title');
59  }

◆ resolveSpecificPlaceholder()

ilExcMailTemplatePeerReminderContext::resolveSpecificPlaceholder (   $placeholder_id,
array  $context_parameters,
ilObjUser  $recipient = null,
  $html_markup = false 
)

{}

Definition at line 104 of file class.ilExcMailTemplatePeerReminderContext.php.

References $obj_data_cache, ilLink\_getLink(), and ilExAssignment\lookupTitle().

105  {
106  $ilObjDataCache = $this->obj_data_cache;
107 
108  if ($placeholder_id == 'ass_title') {
109  return ilExAssignment::lookupTitle($context_parameters["ass_id"]);
110  } elseif ($placeholder_id == 'exc_title') {
111  return $ilObjDataCache->lookupTitle($context_parameters["exc_id"]);
112  } elseif ($placeholder_id == 'ass_link') {
113  require_once './Services/Link/classes/class.ilLink.php';
114  return ilLink::_getLink($context_parameters["exc_ref"], "exc", array(), "_" . $context_parameters["ass_id"]);
115  }
116 
117  return '';
118  }
static lookupTitle($a_id)
Lookup title.
+ Here is the call graph for this function:

Field Documentation

◆ $lng

ilExcMailTemplatePeerReminderContext::$lng
protected

◆ $obj_data_cache

ilExcMailTemplatePeerReminderContext::$obj_data_cache
protected

◆ ID

const ilExcMailTemplatePeerReminderContext::ID = 'exc_context_peer_rmd'

The documentation for this class was generated from the following file: