ILIAS  release_8 Revision v8.23
ilExcMailTemplatePeerReminderContext Class Reference

Handles exercise Peer reminder mail placeholders If all contexts are using the same placeholders,constructor etc. More...

+ Inheritance diagram for ilExcMailTemplatePeerReminderContext:
+ Collaboration diagram for ilExcMailTemplatePeerReminderContext:

Public Member Functions

 __construct (OrgUnitUserService $orgUnitUserService=null, ilMailEnvironmentHelper $envHelper=null, ilMailUserHelper $usernameHelper=null, ilMailLanguageHelper $languageHelper=null)
 
 getId ()
 
 getTitle ()
 
 getDescription ()
 
 getSpecificPlaceholders ()
 
 resolveSpecificPlaceholder (string $placeholder_id, array $context_parameters, ilObjUser $recipient=null, bool $html_markup=false)
 {} More...
 
- 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, bool $html_markup=false)
 
 resolvePlaceholder (string $placeholder_id, array $context_parameters, ilObjUser $recipient=null, bool $html_markup=false)
 

Data Fields

const ID = 'exc_context_peer_rmd'
 

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

Handles exercise Peer reminder mail placeholders If all contexts are using the same placeholders,constructor etc.

todo: create base class.

Author
Jesús López lopez.nosp@m.@lei.nosp@m.fos.c.nosp@m.om

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

Constructor & Destructor Documentation

◆ __construct()

ilExcMailTemplatePeerReminderContext::__construct ( OrgUnitUserService  $orgUnitUserService = null,
ilMailEnvironmentHelper  $envHelper = null,
ilMailUserHelper  $usernameHelper = null,
ilMailLanguageHelper  $languageHelper = null 
)

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

References $DIC, ilMailTemplateContext\$envHelper, ilMailTemplateContext\$languageHelper, ilMailTemplateContext\$orgUnitUserService, ILIAS\GlobalScreen\Provider\__construct(), and ILIAS\Repository\lng().

40  {
41  global $DIC;
42 
44  $orgUnitUserService,
45  $envHelper,
46  $usernameHelper,
47  $languageHelper
48  );
49 
50  $this->lng = $DIC->language();
51  if (isset($DIC["ilObjDataCache"])) {
52  $this->obj_data_cache = $DIC["ilObjDataCache"];
53  }
54  }
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ getDescription()

ilExcMailTemplatePeerReminderContext::getDescription ( )

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

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

70  : string
71  {
72  $lng = $this->lng;
73 
74  $lng->loadLanguageModule('exc');
75 
76  return $lng->txt('exc_mail_context_peer_reminder_info');
77  }
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()

ilExcMailTemplatePeerReminderContext::getId ( )

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

56  : string
57  {
58  return self::ID;
59  }

◆ getSpecificPlaceholders()

ilExcMailTemplatePeerReminderContext::getSpecificPlaceholders ( )

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

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

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

ilExcMailTemplatePeerReminderContext::getTitle ( )

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

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

61  : string
62  {
63  $lng = $this->lng;
64 
65  $lng->loadLanguageModule('exc');
66 
67  return $lng->txt('exc_mail_context_peer_reminder_title');
68  }
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()

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

{}

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

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

111  : string {
112  $ilObjDataCache = $this->obj_data_cache;
113 
114  if ($placeholder_id == 'ass_title') {
115  return ilExAssignment::lookupTitle($context_parameters["ass_id"]);
116  } else {
117  if ($placeholder_id == 'exc_title') {
118  return $ilObjDataCache->lookupTitle((int) $context_parameters["exc_id"]);
119  } else {
120  if ($placeholder_id == 'ass_link') {
121  return ilLink::_getLink(
122  $context_parameters["exc_ref"],
123  "exc",
124  array(),
125  "_" . $context_parameters["ass_id"]
126  );
127  }
128  }
129  }
130 
131  return '';
132  }
static lookupTitle(int $a_id)
+ Here is the call graph for this function:

Field Documentation

◆ $lng

ilLanguage ilExcMailTemplatePeerReminderContext::$lng
protected

◆ $obj_data_cache

ilObjectDataCache ilExcMailTemplatePeerReminderContext::$obj_data_cache
protected

◆ ID

const ilExcMailTemplatePeerReminderContext::ID = 'exc_context_peer_rmd'

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