ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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)
 {
Parameters
array<string,mixed>$context_parameters
} More...
 
- 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_peer_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 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 
)

Reimplemented from ilMailTemplateContext.

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

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 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

Member Function Documentation

◆ getDescription()

ilExcMailTemplatePeerReminderContext::getDescription ( )

Reimplemented from ilMailTemplateContext.

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

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

ilExcMailTemplatePeerReminderContext::getId ( )

Reimplemented from ilMailTemplateContext.

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

References ID.

◆ getSpecificPlaceholders()

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

Reimplemented from ilMailTemplateContext.

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

79 : array
80 {
83
84 $placeholders = array();
85
86 $placeholders['assignment_title'] = array(
87 'placeholder' => 'ASSIGNMENT_TITLE',
88 'label' => $lng->txt('exc_mail_context_reminder_assignment_title')
89 );
90 $placeholders['exercise_title'] = array(
91 'placeholder' => 'EXERCISE_TITLE',
92 'label' => $lng->txt('exc_mail_context_reminder_exercise_title')
93 );
94
95 $placeholders['assignment_link'] = array(
96 'placeholder' => 'ASSIGNMENT_LINK',
97 'label' => $lng->txt('perma_link')
98 );
99
100 return $placeholders;
101 }

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

+ Here is the call graph for this function:

◆ getTitle()

ilExcMailTemplatePeerReminderContext::getTitle ( )

Reimplemented from ilMailTemplateContext.

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

61 : string
62 {
64
66
67 return $lng->txt('exc_mail_context_peer_reminder_title');
68 }

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

+ Here is the call graph for this function:

◆ resolveSpecificPlaceholder()

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

{

Parameters
array<string,mixed>$context_parameters
}

Reimplemented from ilMailTemplateContext.

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

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

References ilExAssignment\lookupTitle().

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