ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
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 64 of file class.ilComponentPluginAdminInitObjective.php.

References $DIC, and $GLOBALS.

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: feed.php:28
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64

◆ 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  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ isApplicable()

ilComponentPluginAdminInitObjective::isApplicable ( Setup\Environment  $environment)

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: