ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 ( )

Reimplemented from ilMailTemplateContext.

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

71 : string
72 {
74
76
77 return $lng->txt('exc_mail_context_submit_reminder_info');
78 }
loadLanguageModule(string $a_module)
Load language module.
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...

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

+ Here is the call graph for this function:

◆ getId()

ilExcMailTemplateSubmitReminderContext::getId ( )

Reimplemented from ilMailTemplateContext.

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

References ID.

◆ getSpecificPlaceholders()

ilExcMailTemplateSubmitReminderContext::getSpecificPlaceholders ( )
Returns
array<string, array{placeholder: string, crs_period_end_mail_placeholder: string}>

Reimplemented from ilMailTemplateContext.

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

80 : array
81 {
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 }

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

+ Here is the call graph for this function:

◆ getTitle()

ilExcMailTemplateSubmitReminderContext::getTitle ( )

Reimplemented from ilMailTemplateContext.

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

62 : string
63 {
65
67
68 return $lng->txt('exc_mail_context_submit_reminder_title');
69 }

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

+ Here is the call graph for this function:

◆ resolveSpecificPlaceholder()

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

Reimplemented from ilMailTemplateContext.

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

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)

References ilExAssignment\lookupTitle().

+ 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: