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

Public Member Functions

 getHash ()
 
 getLabel ()
 
 isNotable ()
 
 getPreconditions (Setup\Environment $environment)
 
 achieve (Setup\Environment $environment)
 
 isApplicable (Setup\Environment $environment)
 @inheritDoc More...
 

Detailed Description

Definition at line 6 of file class.ilComponentPluginAdminInitObjective.php.

Member Function Documentation

◆ achieve()

ilComponentPluginAdminInitObjective::achieve ( Setup\Environment  $environment)

Definition at line 50 of file class.ilComponentPluginAdminInitObjective.php.

50 : Setup\Environment
51 {
52 // ATTENTION: This is a total abomination. It only exists to allow various
53 // sub components of the various readers to run. This is a memento to the
54 // fact, that dependency injection is something we want. Currently, every
55 // component could just service locate the whole world via the global $DIC.
56 $DIC = $GLOBALS["DIC"];
57 $GLOBALS["DIC"] = new DI\Container();
58 $GLOBALS["DIC"]["lng"] = new class() {
59 public function loadLanguageModule()
60 {
61 }
62 };
63
64 $environment = $environment->withResource(
65 Setup\Environment::RESOURCE_PLUGIN_ADMIN,
66 new ilPluginAdmin()
67 );
68
69 $GLOBALS["DIC"] = $DIC;
70
71 return $environment;
72 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
Administration class for plugins.
global $DIC
Definition: goto.php:24

References $DIC, and $GLOBALS.

◆ getHash()

ilComponentPluginAdminInitObjective::getHash ( )

Definition at line 11 of file class.ilComponentPluginAdminInitObjective.php.

11 : string
12 {
13 return hash("sha256", self::class);
14 }

◆ getLabel()

ilComponentPluginAdminInitObjective::getLabel ( )

Definition at line 19 of file class.ilComponentPluginAdminInitObjective.php.

19 : string
20 {
21 return "ilPluginAdmin is initialized and stored into the environment.";
22 }

◆ getPreconditions()

ilComponentPluginAdminInitObjective::getPreconditions ( Setup\Environment  $environment)

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

35 : array
36 {
37 if (!$environment->hasConfigFor('language')) {
38 return [];
39 }
40
41 $config = $environment->getConfigFor('language');
42 return [
43 new \ilLanguagesInstalledAndUpdatedObjective($config, new ilSetupLanguage('en'))
44 ];
45 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
if(!array_key_exists('PATH_INFO', $_SERVER)) $config
Definition: metadata.php:68

References $config.

◆ isApplicable()

ilComponentPluginAdminInitObjective::isApplicable ( Setup\Environment  $environment)

@inheritDoc

Definition at line 77 of file class.ilComponentPluginAdminInitObjective.php.

77 : bool
78 {
79 return is_null($environment->getResource(Setup\Environment::RESOURCE_PLUGIN_ADMIN));
80 }

◆ isNotable()

ilComponentPluginAdminInitObjective::isNotable ( )

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

27 : bool
28 {
29 return true;
30 }

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