ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
LanguageMock Class Reference
+ Inheritance diagram for LanguageMock:
+ Collaboration diagram for LanguageMock:

Public Member Functions

 __construct ()
 
 txt ($a_topic, $a_default_lang_fallback_mod="")
 
 toJS ($a_lang_key, ?ilGlobalTemplateInterface $a_tpl=null)
 Transfer text to Javascript. More...
 
 loadLanguageModule (string $a_module)
 Load language module. More...
 
 getLangKey ()
 Return lang key. More...
 
- Public Member Functions inherited from ilLanguage
 __construct (string $a_lang_key)
 Constructor read the single-language file and put this in an array text. More...
 
 getLangKey ()
 Return lang key. More...
 
 getDefaultLanguage ()
 Return default language. More...
 
 getTextDirection ()
 Return text direction. More...
 
 getContentLanguage ()
 Return content language. More...
 
 txtlng (string $a_module, string $a_topic, string $a_language)
 gets the text for a given topic in a given language if the topic is not in the list, the topic itself with "-" will be returned More...
 
 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 returned More...
 
 exists (string $a_topic)
 Check if language entry exists. More...
 
 loadLanguageModule (string $a_module)
 Load language module. More...
 
 getInstalledLanguages ()
 Get installed languages. More...
 
 getUsedTopics ()
 Return used topics. More...
 
 getUsedModules ()
 Return used modules. More...
 
 getUserLanguage ()
 Return language of user. More...
 
 getCustomLangPath ()
 
 toJS ($a_lang_key, ?ilGlobalTemplateInterface $a_tpl=null)
 Transfer text to Javascript. More...
 
 toJSMap (array $a_map, ?ilGlobalTemplateInterface $a_tpl=null)
 Transfer text to Javascript. More...
 
 __destruct ()
 destructor saves all language usages to db if log is enabled and ilDB exists More...
 
- Public Member Functions inherited from ILIAS\Language\Language
 txt (string $a_topic, string $a_default_lang_fallback_mod="")
 
 loadLanguageModule (string $a_module)
 
 getLangKey ()
 
 toJS ($key)
 

Data Fields

array $requested = array()
 
string $lang_module = 'common'
 
- Data Fields inherited from ilLanguage
ILIAS $ilias
 
array $text = []
 
string $lang_default
 
string $lang_user
 
string $lang_path
 
string $lang_key
 
string $lang_name
 
string $separator = "#:#"
 
string $comment_separator = "###"
 
array $loaded_modules = array()
 

Additional Inherited Members

- Static Public Member Functions inherited from ilLanguage
static _getInstalledLanguages ()
 Get installed languages. More...
 
static _lookupEntry (string $a_lang_key, string $a_mod, string $a_id)
 
static lookupId (string $a_lang_key)
 Lookup obj_id of language. More...
 
static getFallbackInstance ()
 Builds a global default language instance. More...
 
static getGlobalInstance ()
 Builds the global language object. More...
 
- Static Protected Member Functions inherited from ilLanguage
static logUsage (string $a_module, string $a_identifier)
 saves tupel of language module and identifier More...
 
static isUsageLogEnabled ()
 checks if language usage log is enabled you need MySQL to use this function this function is automatically enabled if DEVMODE is on this function is also enabled if language_log is 1 More...
 
- Protected Attributes inherited from ilLanguage
array $cached_modules = array()
 
array $map_modules_txt = array()
 
bool $usage_log_enabled = false
 
string $cust_lang_path
 
ilLogger $log
 
ilCachedLanguage $global_cache
 
- Static Protected Attributes inherited from ilLanguage
static array $used_topics = array()
 
static array $used_modules = array()
 
static array $lng_log = array()
 

Detailed Description

Definition at line 174 of file Base.php.

Constructor & Destructor Documentation

◆ __construct()

LanguageMock::__construct ( )

Definition at line 178 of file Base.php.

179 {
180 }

Member Function Documentation

◆ getLangKey()

LanguageMock::getLangKey ( )

Return lang key.

Reimplemented from ilLanguage.

Definition at line 198 of file Base.php.

198 : string
199 {
200 return "en";
201 }

◆ loadLanguageModule()

LanguageMock::loadLanguageModule ( string  $a_module)

Load language module.

Reimplemented from ilLanguage.

Definition at line 194 of file Base.php.

194 : void
195 {
196 }

◆ toJS()

LanguageMock::toJS (   $a_lang_key,
?ilGlobalTemplateInterface  $a_tpl = null 
)

Transfer text to Javascript.

Parameters
string | string[]$a_lang_key$a_lang_key language key string or array of language keys

Reimplemented from ilLanguage.

Definition at line 188 of file Base.php.

188 : void
189 {
190 }

◆ txt()

LanguageMock::txt (   $a_topic,
  $a_default_lang_fallback_mod = "" 
)

Definition at line 182 of file Base.php.

182 : string
183 {
184 $this->requested[] = $a_topic;
185 return $a_topic;
186 }

Field Documentation

◆ $lang_module

string LanguageMock::$lang_module = 'common'

Definition at line 192 of file Base.php.

◆ $requested

array LanguageMock::$requested = array()

Definition at line 176 of file Base.php.


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