Class ilMailTemplateContext.
More...
◆ getDescription()
ilMailTemplateContext::getDescription |
( |
| ) |
|
|
abstract |
Returns a translated description (depending on the current language) which is displayed in the user interface.
- Returns
- string
Referenced by setLanguage().
◆ getGenericPlaceholders()
static ilMailTemplateContext::getGenericPlaceholders |
( |
| ) |
|
|
staticfinalprivate |
- Returns
- array
Definition at line 57 of file class.ilMailTemplateContext.php.
References $DIC, and array.
62 'mail_salutation' =>
array(
63 'placeholder' =>
'MAIL_SALUTATION',
64 'label' => $DIC->language()->txt(
'mail_nacc_salutation')
66 'first_name' =>
array(
67 'placeholder' =>
'FIRST_NAME',
68 'label' => $DIC->language()->txt(
'firstname')
71 'placeholder' =>
'LAST_NAME',
72 'label' => $DIC->language()->txt(
'lastname')
75 'placeholder' =>
'LOGIN',
76 'label' => $DIC->language()->txt(
'mail_nacc_login')
79 'placeholder' =>
'TITLE',
80 'label' => $DIC->language()->txt(
'mail_nacc_title'),
81 'supportsCondition' => true
84 'placeholder' =>
'ILIAS_URL',
85 'label' => $DIC->language()->txt(
'mail_nacc_ilias_url')
87 'client_name' =>
array(
88 'placeholder' =>
'CLIENT_NAME',
89 'label' => $DIC->language()->txt(
'mail_nacc_client_name')
Create styles array
The data for the language used.
◆ getId()
ilMailTemplateContext::getId |
( |
| ) |
|
|
abstract |
◆ getLanguage()
ilMailTemplateContext::getLanguage |
( |
| ) |
|
◆ getPlaceholders()
ilMailTemplateContext::getPlaceholders |
( |
| ) |
|
|
final |
◆ getSpecificPlaceholders()
ilMailTemplateContext::getSpecificPlaceholders |
( |
| ) |
|
|
abstract |
◆ getTitle()
ilMailTemplateContext::getTitle |
( |
| ) |
|
|
abstract |
Returns a translated title (depending on the current language) which is displayed in the user interface.
- Returns
- string
Referenced by setLanguage().
◆ initLanguage()
ilMailTemplateContext::initLanguage |
( |
ilObjUser |
$user | ) |
|
|
protected |
◆ initLanguageByIso2Code()
ilMailTemplateContext::initLanguageByIso2Code |
( |
|
$a_code | ) |
|
|
protected |
◆ resolvePlaceholder()
ilMailTemplateContext::resolvePlaceholder |
( |
|
$placeholder_id, |
|
|
array |
$context_parameters, |
|
|
ilObjUser |
$recipient = null , |
|
|
|
$html_markup = false |
|
) |
| |
- Parameters
-
string | $placeholder_id | The unique (in the context of your class) placeholder id |
array | $context_parameters | The context parameters given by the mail system (array of key/value pairs) |
ilObjUser | null | $recipient | The recipient for this mail |
bool | $html_markup | A flag whether or not the return value may contain HTML markup |
- Returns
- string
Definition at line 128 of file class.ilMailTemplateContext.php.
References getLanguage(), ilDatePresentation\getLanguage(), initLanguage(), resolveSpecificPlaceholder(), and ilDatePresentation\setLanguage().
130 if ($recipient !== null) {
140 case (
'mail_salutation' == $placeholder_id && $recipient !== null):
143 $resolved = $this->
getLanguage()->txt(
'mail_salutation_f');
147 $resolved = $this->
getLanguage()->txt(
'mail_salutation_m');
151 $resolved = $this->
getLanguage()->txt(
'mail_salutation_n');
155 $resolved = $this->
getLanguage()->txt(
'mail_salutation_n');
159 case (
'first_name' == $placeholder_id && $recipient !== null):
163 case (
'last_name' == $placeholder_id && $recipient !== null):
167 case (
'login' == $placeholder_id && $recipient !== null):
171 case (
'title' == $placeholder_id && $recipient !== null):
175 case 'ilias_url' == $placeholder_id:
176 $resolved = ILIAS_HTTP_PATH .
'/login.php?client_id=' . CLIENT_ID;
179 case 'client_name' == $placeholder_id:
180 $resolved = CLIENT_NAME;
183 case !in_array($placeholder_id, array_keys(self::getGenericPlaceholders())):
getLogin()
get login / username public
getFirstname()
get firstname public
resolveSpecificPlaceholder($placeholder_id, array $context_parameters, ilObjUser $recipient=null, $html_markup=false)
static setLanguage($a_lng)
set language
initLanguage(ilObjUser $user)
getLastname()
get lastname public
getUTitle()
get user title (note: don't mix up this method with getTitle() that is derived from ilObject and gets...
static getLanguage()
set language
getGender()
get gender public
◆ resolveSpecificPlaceholder()
ilMailTemplateContext::resolveSpecificPlaceholder |
( |
|
$placeholder_id, |
|
|
array |
$context_parameters, |
|
|
ilObjUser |
$recipient = null , |
|
|
|
$html_markup = false |
|
) |
| |
|
abstract |
◆ setLanguage()
ilMailTemplateContext::setLanguage |
( |
|
$language | ) |
|
◆ $language
ilMailTemplateContext::$language |
|
protected |
The documentation for this class was generated from the following file: