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

Public Member Functions

 __construct (\ilLanguageSetupConfig $config, \ilSetupLanguage $il_setup_language)
 
 getHash ()
 
 getLabel ()
 
 isNotable ()
 
 getPreconditions (Setup\Environment $environment)
 
 achieve (Setup\Environment $environment)
 
- Public Member Functions inherited from ilLanguageObjective
 __construct (\ilLanguageSetupConfig $config)
 

Protected Member Functions

 getInstallLanguagesAsString ()
 
 getInstallLocalLanguagesAsString ()
 

Protected Attributes

 $il_setup_language
 
- Protected Attributes inherited from ilLanguageObjective
 $config
 

Detailed Description

Definition at line 7 of file class.ilLanguagesInstalledObjective.php.

Constructor & Destructor Documentation

◆ __construct()

ilLanguagesInstalledObjective::__construct ( \ilLanguageSetupConfig  $config,
\ilSetupLanguage  $il_setup_language 
)

Definition at line 14 of file class.ilLanguagesInstalledObjective.php.

References ilLanguageObjective\$config, $il_setup_language, and ILIAS\GlobalScreen\Provider\__construct().

+ Here is the call graph for this function:

Member Function Documentation

◆ achieve()

ilLanguagesInstalledObjective::achieve ( Setup\Environment  $environment)

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

60 : Setup\Environment
61 {
62 $db = $environment->getResource(Setup\Environment::RESOURCE_DATABASE);
63
64 // TODO: Remove this once ilSetupLanguage (or a successor) supports proper
65 // DI for all methods.
66 $GLOBALS["ilDB"] = $db;
67
68 $this->il_setup_language->setDbHandler($db);
69 $this->il_setup_language->installLanguages(
70 $this->config->getInstallLanguages(),
71 $this->config->getInstallLocalLanguages()
72 );
73
74 return $environment;
75 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64

References $GLOBALS, and ILIAS\Setup\Environment\getResource().

+ Here is the call graph for this function:

◆ getHash()

ilLanguagesInstalledObjective::getHash ( )

Definition at line 22 of file class.ilLanguagesInstalledObjective.php.

22 : string
23 {
24 return hash(
25 "sha256",
26 self::class . "::" .
27 $this->getInstallLanguagesAsString() . "::" .
29 );
30 }

References getInstallLanguagesAsString(), and getInstallLocalLanguagesAsString().

+ Here is the call graph for this function:

◆ getInstallLanguagesAsString()

ilLanguagesInstalledObjective::getInstallLanguagesAsString ( )
protected

Definition at line 32 of file class.ilLanguagesInstalledObjective.php.

33 {
34 return implode(", ", $this->config->getInstallLanguages());
35 }

Referenced by getHash(), and getLabel().

+ Here is the caller graph for this function:

◆ getInstallLocalLanguagesAsString()

ilLanguagesInstalledObjective::getInstallLocalLanguagesAsString ( )
protected

Definition at line 37 of file class.ilLanguagesInstalledObjective.php.

38 {
39 return implode(", ", $this->config->getInstallLocalLanguages());
40 }

Referenced by getHash().

+ Here is the caller graph for this function:

◆ getLabel()

ilLanguagesInstalledObjective::getLabel ( )

Definition at line 42 of file class.ilLanguagesInstalledObjective.php.

42 : string
43 {
44 return "Install languages " . $this->getInstallLanguagesAsString();
45 }

References getInstallLanguagesAsString().

+ Here is the call graph for this function:

◆ getPreconditions()

ilLanguagesInstalledObjective::getPreconditions ( Setup\Environment  $environment)

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

52 : array
53 {
54 $db_config = $environment->getConfigFor("database");
55 return [
56 new ilDatabasePopulatedObjective($db_config)
57 ];
58 }

◆ isNotable()

ilLanguagesInstalledObjective::isNotable ( )

Definition at line 47 of file class.ilLanguagesInstalledObjective.php.

47 : bool
48 {
49 return true;
50 }

Field Documentation

◆ $il_setup_language

ilLanguagesInstalledObjective::$il_setup_language
protected

Definition at line 12 of file class.ilLanguagesInstalledObjective.php.

Referenced by __construct().


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