ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
ilExcMailTemplateSubmitReminderContext Class Reference

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

+ Inheritance diagram for ilExcMailTemplateSubmitReminderContext:
+ Collaboration diagram for ilExcMailTemplateSubmitReminderContext:

Public Member Functions

 getId ()
 
 getTitle ()
 
 getDescription ()
 
 getSpecificPlaceholders ()
 
 resolveSpecificPlaceholder (string $placeholder_id, array $context_parameters, ?ilObjUser $recipient=null)
 
- Public Member Functions inherited from ilMailTemplateContext
 __construct (?OrgUnitUserService $org_unit_user_service=null, ?ilMailEnvironmentHelper $environment_helper=null, ?ilMailUserHelper $user_helper=null, ?ilMailLanguageHelper $language_helper=null)
 
 getLanguage ()
 
 getId ()
 
 getTitle ()
 
 getDescription ()
 
 getNestedPlaceholders ()
 
 getPlaceholders ()
 
 getSpecificPlaceholders ()
 
 resolveSpecificPlaceholder (string $placeholder_id, array $context_parameters, ?ilObjUser $recipient=null)
 
 resolvePlaceholder (string $placeholder_id, array $context_parameters, ?ilObjUser $recipient=null)
 

Data Fields

const ID = 'exc_context_submit_rmd'
 

Protected Attributes

ilLanguage $lng
 
ilObjectDataCache $obj_data_cache
 
- Protected Attributes inherited from ilMailTemplateContext
ilLanguage $language
 
ilMailEnvironmentHelper $env_helper
 
ilMailLanguageHelper $language_helper
 
ilMailUserHelper $user_helper
 
OrgUnitUserService $org_unit_user_service
 

Additional Inherited Members

- Protected Member Functions inherited from ilMailTemplateContext
 initLanguage (ilObjUser $user)
 
 initLanguageByIso2Code (string $iso_code)
 

Detailed Description

Handles exercise Submit 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.ilExcMailTemplateSubmitReminderContext.php.

Member Function Documentation

◆ getDescription()

ilExcMailTemplateSubmitReminderContext::getDescription ( )

Definition at line 71 of file class.ilExcMailTemplateSubmitReminderContext.php.

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

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

ilExcMailTemplateSubmitReminderContext::getId ( )

Definition at line 57 of file class.ilExcMailTemplateSubmitReminderContext.php.

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

◆ getSpecificPlaceholders()

ilExcMailTemplateSubmitReminderContext::getSpecificPlaceholders ( )

Definition at line 80 of file class.ilExcMailTemplateSubmitReminderContext.php.

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

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

ilExcMailTemplateSubmitReminderContext::getTitle ( )

Definition at line 62 of file class.ilExcMailTemplateSubmitReminderContext.php.

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

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

ilExcMailTemplateSubmitReminderContext::resolveSpecificPlaceholder ( string  $placeholder_id,
array  $context_parameters,
?ilObjUser  $recipient = null 
)

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

References $obj_data_cache, and ilExAssignment\lookupTitle().

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

Field Documentation

◆ $lng

ilLanguage ilExcMailTemplateSubmitReminderContext::$lng
protected

◆ $obj_data_cache

ilObjectDataCache ilExcMailTemplateSubmitReminderContext::$obj_data_cache
protected

◆ ID

const ilExcMailTemplateSubmitReminderContext::ID = 'exc_context_submit_rmd'

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