ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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

Member Function Documentation

◆ achieve()

ilComponentPluginAdminInitObjective::achieve ( Setup\Environment  $environment)

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

64 : Setup\Environment
65 {
66 // ATTENTION: This is a total abomination. It only exists to allow various
67 // sub components of the various readers to run. This is a memento to the
68 // fact, that dependency injection is something we want. Currently, every
69 // component could just service locate the whole world via the global $DIC.
70 $DIC = $GLOBALS["DIC"];
71 $GLOBALS["DIC"] = new DI\Container();
72 $GLOBALS["DIC"]["lng"] = new class () {
73 public function loadLanguageModule(): void
74 {
75 }
76 };
77
78 $environment = $environment->withResource(
79 Setup\Environment::RESOURCE_PLUGIN_ADMIN,
80 new ilPluginAdmin($environment->getResource(Setup\Environment::RESOURCE_COMPONENT_REPOSITORY))
81 );
82
83 $GLOBALS["DIC"] = $DIC;
84
85 return $environment;
86 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: shib_login.php:26
$GLOBALS["DIC"]
Definition: wac.php:54

References $DIC, and $GLOBALS.

◆ getHash()

ilComponentPluginAdminInitObjective::getHash ( )

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

29 : string
30 {
31 return hash("sha256", self::class);
32 }

◆ getLabel()

ilComponentPluginAdminInitObjective::getLabel ( )

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

37 : string
38 {
39 return "ilPluginAdmin is initialized and stored into the environment.";
40 }

◆ getPreconditions()

ilComponentPluginAdminInitObjective::getPreconditions ( Setup\Environment  $environment)

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

53 : array
54 {
55 return [
56 new \ilLanguagesInstalledAndUpdatedObjective(new ilSetupLanguage('en')),
58 ];
59 }
language handling for setup

◆ isApplicable()

ilComponentPluginAdminInitObjective::isApplicable ( Setup\Environment  $environment)

@inheritDoc

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

91 : bool
92 {
93 return is_null($environment->getResource(Setup\Environment::RESOURCE_PLUGIN_ADMIN));
94 }

◆ isNotable()

ilComponentPluginAdminInitObjective::isNotable ( )

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

45 : bool
46 {
47 return true;
48 }

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