ILIAS  release_7 Revision v7.30-3-g800a261c036
ilLanguagesInstalledAndUpdatedObjective Class Reference
+ Inheritance diagram for ilLanguagesInstalledAndUpdatedObjective:
+ Collaboration diagram for ilLanguagesInstalledAndUpdatedObjective:

Public Member Functions

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

Protected Member Functions

 getInstallLanguages ()
 
 getInstallLocalLanguages ()
 

Protected Attributes

 $il_setup_language
 
- Protected Attributes inherited from ilLanguageObjective
 $config
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilLanguagesInstalledAndUpdatedObjective::__construct ( ?\ilLanguageSetupConfig  $config,
\ilSetupLanguage  $il_setup_language 
)

Member Function Documentation

◆ achieve()

ilLanguagesInstalledAndUpdatedObjective::achieve ( Setup\Environment  $environment)

Definition at line 65 of file class.ilLanguagesInstalledAndUpdatedObjective.php.

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

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

+ Here is the call graph for this function:

◆ getHash()

ilLanguagesInstalledAndUpdatedObjective::getHash ( )

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

22 : string
23 {
24 return hash("sha256", self::class);
25 }

◆ getInstallLanguages()

ilLanguagesInstalledAndUpdatedObjective::getInstallLanguages ( )
protected

Definition at line 27 of file class.ilLanguagesInstalledAndUpdatedObjective.php.

28 {
29 if (!is_null($this->config)) {
30 return $this->config->getInstallLanguages();
31 }
32 return $this->il_setup_language->getInstalledLanguages();
33 }

Referenced by achieve(), and getLabel().

+ Here is the caller graph for this function:

◆ getInstallLocalLanguages()

ilLanguagesInstalledAndUpdatedObjective::getInstallLocalLanguages ( )
protected

Definition at line 35 of file class.ilLanguagesInstalledAndUpdatedObjective.php.

36 {
37 if (!is_null($this->config)) {
38 return $this->config->getInstallLocalLanguages();
39 }
40 return $this->il_setup_language->getInstalledLocalLanguages();
41 }

Referenced by achieve().

+ Here is the caller graph for this function:

◆ getLabel()

ilLanguagesInstalledAndUpdatedObjective::getLabel ( )

Definition at line 43 of file class.ilLanguagesInstalledAndUpdatedObjective.php.

43 : string
44 {
45 return "Install/Update languages " . implode(", ", $this->getInstallLanguages());
46 }

References getInstallLanguages().

+ Here is the call graph for this function:

◆ getPreconditions()

ilLanguagesInstalledAndUpdatedObjective::getPreconditions ( Setup\Environment  $environment)

Definition at line 53 of file class.ilLanguagesInstalledAndUpdatedObjective.php.

53 : array
54 {
55 if (is_null($this->config)) {
56 return [];
57 }
58
59 $db_config = $environment->getConfigFor("database");
60 return [
61 new ilDatabasePopulatedObjective($db_config)
62 ];
63 }

◆ isApplicable()

ilLanguagesInstalledAndUpdatedObjective::isApplicable ( Setup\Environment  $environment)

@inheritDoc

Definition at line 88 of file class.ilLanguagesInstalledAndUpdatedObjective.php.

88 : bool
89 {
90 return true;
91 }

◆ isNotable()

ilLanguagesInstalledAndUpdatedObjective::isNotable ( )

Definition at line 48 of file class.ilLanguagesInstalledAndUpdatedObjective.php.

48 : bool
49 {
50 return true;
51 }

Field Documentation

◆ $il_setup_language

ilLanguagesInstalledAndUpdatedObjective::$il_setup_language
protected

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

Referenced by __construct().


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