ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilExcMailTemplateGradeReminderContext Class Reference
+ Inheritance diagram for ilExcMailTemplateGradeReminderContext:
+ Collaboration diagram for ilExcMailTemplateGradeReminderContext:

Public Member Functions

 __construct (OrgUnitUserService $orgUnitUserService=null, ilMailEnvironmentHelper $envHelper=null, ilMailUserHelper $usernameHelper=null, ilMailLanguageHelper $languageHelper=null)
 ilMailTemplateContext constructor. More...
 
 getId ()
 
 getTitle ()
 
 getDescription ()
 
 getSpecificPlaceholders ()
 Return an array of placeholders. More...
 
 resolveSpecificPlaceholder (string $placeholder_id, array $context_parameters, ilObjUser $recipient=null, bool $html_markup=false)
 {
Parameters
string$placeholder_id
array$context_parameters
ilObjUser | null$recipient
bool$html_markup
Returns
string
} More...
 
- Public Member Functions inherited from ilMailTemplateContext
 __construct (OrgUnitUserService $orgUnitUserService=null, ilMailEnvironmentHelper $envHelper=null, ilMailUserHelper $usernameHelper=null, ilMailLanguageHelper $languageHelper=null)
 ilMailTemplateContext constructor. More...
 
 getLanguage ()
 
 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 (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_grade_rmd'
 

Protected Attributes

 $lng
 
 $obj_data_cache
 
- Protected Attributes inherited from ilMailTemplateContext
 $language
 
 $envHelper
 
 $languageHelper
 
 $userHelper
 
 $orgUnitUserService
 

Additional Inherited Members

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

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

ilMailTemplateContext constructor.

Parameters
OrgUnitUserService | null$orgUnitUserService
ilMailEnvironmentHelper | null$envHelper
ilMailUserHelper | null$usernameHelper
ilMailLanguageHelper | null$languageHelper

Reimplemented from ilMailTemplateContext.

Definition at line 25 of file class.ilExcMailTemplateGradeReminderContext.php.

30 {
31 global $DIC;
32
36 $usernameHelper,
38 );
39
40 $this->lng = $DIC->language();
41 if (isset($DIC["ilObjDataCache"])) {
42 $this->obj_data_cache = $DIC["ilObjDataCache"];
43 }
45 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$DIC
Definition: xapitoken.php:46

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

+ Here is the call graph for this function:

Member Function Documentation

◆ getDescription()

ilExcMailTemplateGradeReminderContext::getDescription ( )
Returns
string

Reimplemented from ilMailTemplateContext.

Definition at line 72 of file class.ilExcMailTemplateGradeReminderContext.php.

72 : string
73 {
75
76 $lng->loadLanguageModule('exc');
77
78 return $lng->txt('exc_mail_context_grade_reminder_info');
79 }

References $lng.

◆ getId()

ilExcMailTemplateGradeReminderContext::getId ( )
Returns
string

Reimplemented from ilMailTemplateContext.

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

References ID.

◆ getSpecificPlaceholders()

ilExcMailTemplateGradeReminderContext::getSpecificPlaceholders ( )

Return an array of placeholders.

Returns
array

Reimplemented from ilMailTemplateContext.

Definition at line 85 of file class.ilExcMailTemplateGradeReminderContext.php.

85 : array
86 {
88 $lng->loadLanguageModule('exc');
89
90 $placeholders = array();
91
92 $placeholders['ass_title'] = array(
93 'placeholder' => 'ASSIGNMENT_TITLE',
94 'label' => $lng->txt('exc_mail_context_reminder_assignment_title')
95 );
96 $placeholders['exc_title'] = array(
97 'placeholder' => 'EXERCISE_TITLE',
98 'label' => $lng->txt('exc_mail_context_reminder_exercise_title')
99 );
100
101 $placeholders['ass_link'] = array(
102 'placeholder' => 'ASSIGNMENT_LINK',
103 'label' => $lng->txt('perma_link')
104 );
105
106 return $placeholders;
107 }

References $lng.

◆ getTitle()

ilExcMailTemplateGradeReminderContext::getTitle ( )
Returns
string

Reimplemented from ilMailTemplateContext.

Definition at line 60 of file class.ilExcMailTemplateGradeReminderContext.php.

60 : string
61 {
63
64 $lng->loadLanguageModule('exc');
65
66 return $lng->txt('exc_mail_context_grade_reminder_title');
67 }

References $lng.

◆ resolveSpecificPlaceholder()

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

{

Parameters
string$placeholder_id
array$context_parameters
ilObjUser | null$recipient
bool$html_markup
Returns
string
}

Reimplemented from ilMailTemplateContext.

Definition at line 112 of file class.ilExcMailTemplateGradeReminderContext.php.

117 : string {
118 $ilObjDataCache = $this->obj_data_cache;
119
120 if ($placeholder_id == 'ass_title') {
121 return ilExAssignment::lookupTitle($context_parameters["ass_id"]);
122 } else {
123 if ($placeholder_id == 'exc_title') {
124 return $ilObjDataCache->lookupTitle($context_parameters["exc_id"]);
125 } else {
126 if ($placeholder_id == 'ass_link') {
127 return ilLink::_getLink(
128 $context_parameters["exc_ref"],
129 "exc",
130 array(),
131 "_" . $context_parameters["ass_id"]
132 );
133 }
134 }
135 }
136
137 return '';
138 }
static lookupTitle($a_id)
Lookup title.

References ilExAssignment\lookupTitle().

+ Here is the call graph for this function:

Field Documentation

◆ $lng

ilExcMailTemplateGradeReminderContext::$lng
protected

◆ $obj_data_cache

ilExcMailTemplateGradeReminderContext::$obj_data_cache
protected

◆ ID

const ilExcMailTemplateGradeReminderContext::ID = 'exc_context_grade_rmd'

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