ILIAS  trunk Revision v11.0_alpha-1749-g1a06bdef097
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilCourseMailTemplateMemberContext Class Reference
+ Inheritance diagram for ilCourseMailTemplateMemberContext:
+ Collaboration diagram for ilCourseMailTemplateMemberContext:

Public Member Functions

 __construct (?\OrgUnit\PublicApi\OrgUnitUserService $orgUnitUserService=null, ?ilMailEnvironmentHelper $envHelper=null, ?ilMailUserHelper $usernameHelper=null, ?ilMailLanguageHelper $languageHelper=null)
 
 getId ()
 
 getTitle ()
 
 getDescription ()
 
- Public Member Functions inherited from ilMailTemplateContext
 __construct (?OrgUnitUserService $orgUnitUserService=null, ?ilMailEnvironmentHelper $envHelper=null, ?ilMailUserHelper $usernameHelper=null, ?ilMailLanguageHelper $languageHelper=null)
 
 getLanguage ()
 
 getId ()
 
 getTitle ()
 
 getDescription ()
 
 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 = 'crs_context_member_manual'
 

Protected Attributes

ilLanguage $lng
 
- Protected Attributes inherited from ilMailTemplateContext
ilLanguage $language
 
ilMailEnvironmentHelper $envHelper
 
ilMailLanguageHelper $languageHelper
 
ilMailUserHelper $userHelper
 
OrgUnitUserService $orgUnitUserService
 

Static Protected Attributes

static array $periodInfoByObjIdCache = []
 

Private Member Functions

 getCachedPeriodByObjId (int $objId)
 

Additional Inherited Members

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

Detailed Description

Definition at line 26 of file class.ilCourseMailTemplateMemberContext.php.

Constructor & Destructor Documentation

◆ __construct()

ilCourseMailTemplateMemberContext::__construct ( ?\OrgUnit\PublicApi\OrgUnitUserService  $orgUnitUserService = null,
?ilMailEnvironmentHelper  $envHelper = null,
?ilMailUserHelper  $usernameHelper = null,
?ilMailLanguageHelper  $languageHelper = null 
)

Member Function Documentation

◆ getCachedPeriodByObjId()

ilCourseMailTemplateMemberContext::getCachedPeriodByObjId ( int  $objId)
private

Definition at line 107 of file class.ilCourseMailTemplateMemberContext.php.

References $DIC, $objId, ilDatePresentation\formatDate(), ilObjCourseAccess\lookupPeriodInfo(), null, ilMailTemplateContext\resolveSpecificPlaceholder(), ilDatePresentation\setUseRelativeDates(), and ilDatePresentation\useRelativeDates().

107  : array
108  {
109  if (!array_key_exists($objId, self::$periodInfoByObjIdCache)) {
110  self::$periodInfoByObjIdCache[$objId] = ilObjCourseAccess::lookupPeriodInfo($objId);
111  }
112 
113  return self::$periodInfoByObjIdCache[$objId];
114  }
$objId
Definition: xapitoken.php:57
static lookupPeriodInfo(int $a_obj_id)
+ Here is the call graph for this function:

◆ getDescription()

ilCourseMailTemplateMemberContext::getDescription ( )

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

References $DIC, ilMailTemplateContext\getSpecificPlaceholders(), ilLanguage\loadLanguageModule(), and ilLanguage\txt().

60  : string
61  {
62  global $DIC;
63 
64  $lng = $DIC['lng'];
65 
66  $lng->loadLanguageModule('crs');
67 
68  return $lng->txt('crs_mail_context_member_info');
69  }
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...
loadLanguageModule(string $a_module)
Load language module.
global $DIC
Definition: shib_login.php:22
+ Here is the call graph for this function:

◆ getId()

ilCourseMailTemplateMemberContext::getId ( )

Definition at line 44 of file class.ilCourseMailTemplateMemberContext.php.

44  : string
45  {
46  return self::ID;
47  }

◆ getTitle()

ilCourseMailTemplateMemberContext::getTitle ( )

Definition at line 49 of file class.ilCourseMailTemplateMemberContext.php.

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

49  : string
50  {
51  global $DIC;
52 
53  $lng = $DIC['lng'];
54 
55  $lng->loadLanguageModule('crs');
56 
57  return $lng->txt('crs_mail_context_member_title');
58  }
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...
loadLanguageModule(string $a_module)
Load language module.
global $DIC
Definition: shib_login.php:22
+ Here is the call graph for this function:

Field Documentation

◆ $lng

ilLanguage ilCourseMailTemplateMemberContext::$lng
protected

Definition at line 33 of file class.ilCourseMailTemplateMemberContext.php.

◆ $periodInfoByObjIdCache

array ilCourseMailTemplateMemberContext::$periodInfoByObjIdCache = []
staticprotected

Definition at line 31 of file class.ilCourseMailTemplateMemberContext.php.

◆ ID

const ilCourseMailTemplateMemberContext::ID = 'crs_context_member_manual'

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