ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
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)
 

Detailed Description

Member Function Documentation

◆ achieve()

ilComponentPluginAdminInitObjective::achieve ( Setup\Environment  $environment)

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

References $DIC, and $GLOBALS.

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

◆ getHash()

ilComponentPluginAdminInitObjective::getHash ( )

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

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

◆ getLabel()

ilComponentPluginAdminInitObjective::getLabel ( )

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

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

◆ getPreconditions()

ilComponentPluginAdminInitObjective::getPreconditions ( Setup\Environment  $environment)

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

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

◆ isApplicable()

ilComponentPluginAdminInitObjective::isApplicable ( Setup\Environment  $environment)

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

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

◆ isNotable()

ilComponentPluginAdminInitObjective::isNotable ( )

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

46  : bool
47  {
48  return true;
49  }

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