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)
 
 getId ()
 
 getTitle ()
 
 getDescription ()
 
 getSpecificPlaceholders ()
 Return an array of placeholders. More...
 
 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)
 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 
)

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

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

30  {
31  global $DIC;
32 
34  $orgUnitUserService,
35  $envHelper,
36  $usernameHelper,
37  $languageHelper
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)
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

Member Function Documentation

◆ getDescription()

ilExcMailTemplateGradeReminderContext::getDescription ( )
Returns
string

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

References $lng.

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

◆ getId()

ilExcMailTemplateGradeReminderContext::getId ( )
Returns
string

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

52  : string
53  {
54  return self::ID;
55  }

◆ getSpecificPlaceholders()

ilExcMailTemplateGradeReminderContext::getSpecificPlaceholders ( )

Return an array of placeholders.

Returns
array

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

References $lng.

85  : array
86  {
87  $lng = $this->lng;
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  }

◆ getTitle()

ilExcMailTemplateGradeReminderContext::getTitle ( )
Returns
string

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

References $lng.

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

◆ resolveSpecificPlaceholder()

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

{}

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

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

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