19declare(strict_types=1);
38 return hash(
"sha256", self::class . $this->plugin_name);
46 return "Update plugin language $this->plugin_name.";
63 new \ilIniFilesLoadedObjective(),
64 new \ilDatabaseInitializedObjective(),
75 $component_repository = $environment->
getResource(Setup\Environment::RESOURCE_COMPONENT_REPOSITORY);
76 [$ORIG_DIC, $ORIG_ilDB] = $this->
initEnvironment($environment, $component_repository);
78 $plugin = $component_repository->getPluginByName($this->plugin_name);
80 $language_handler->updateLanguages();
93 $component_repository = $environment->getResource(Setup\Environment::RESOURCE_COMPONENT_REPOSITORY);
95 return $component_repository->getPluginByName($this->plugin_name)->supportsCLISetup();
100 $db = $environment->getResource(Setup\Environment::RESOURCE_DATABASE);
101 $ini = $environment->getResource(Setup\Environment::RESOURCE_ILIAS_INI);
102 $client_ini = $environment->getResource(Setup\Environment::RESOURCE_CLIENT_INI);
103 $component_factory = $environment->getResource(Setup\Environment::RESOURCE_COMPONENT_FACTORY);
117 $GLOBALS[
"DIC"][
"ilClientIniFile"] = $client_ini;
118 $GLOBALS[
"DIC"][
"component.factory"] = $component_factory;
123 public function isHandling(
int $a_level):
bool
127 public function log(
string $a_message,
int $a_level =
ilLogLevel::INFO):
void
133 public function debug(
string $a_message, array $a_context = array()):
void
136 public function info(
string $a_message):
void
139 public function notice(
string $a_message):
void
142 public function warning(
string $a_message):
void
145 public function error(
string $a_message):
void
148 public function critical(
string $a_message):
void
151 public function alert(
string $a_message):
void
154 public function emergency(
string $a_message):
void
160 public function writeLanguageLog(
string $a_topic,
string $a_lang_key):
void
163 public function logStack(?
int $a_level =
null,
string $a_message =
''):
void
166 public function writeMemoryPeakUsage(
int $a_level):
void
174 public static function getRootLogger():
ilLogger
178 public static function getLogger(
string $a_component_id):
ilLogger
186 $GLOBALS[
"DIC"][
"lng"]->lang_user =
"en";
198 public function raise($a_component, $a_event, $a_parameter =
""):
void
204 $GLOBALS[
"DIC"][
"component.repository"] = $component_repository;
219 $this->prefs[
"language"] =
"en";
223 if (!defined(
'DEBUG')) {
224 define(
'DEBUG',
false);
227 if (!defined(
"ILIAS_ABSOLUTE_PATH")) {
228 define(
"ILIAS_ABSOLUTE_PATH", dirname(__FILE__, 5));
231 if (!defined(
'SYSTEM_ROLE_ID')) {
232 define(
'SYSTEM_ROLE_ID',
'2');
235 if (!defined(
"CLIENT_ID")) {
236 define(
'CLIENT_ID', $client_ini->readVariable(
'client',
'name'));
239 if (!defined(
"ILIAS_WEB_DIR")) {
240 define(
'ILIAS_WEB_DIR', dirname(__DIR__, 4) .
"/data/");
243 return [$ORIG_DIC, $ORIG_ilDB];
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Customizing of pimple-DIC for ILIAS.
Component logger with individual log levels by component id.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
parses the objects.xml it handles the xml-description of all ilias objects
initEnvironment(Setup\Environment $environment, \ilComponentRepository $component_repository)
achieve(Setup\Environment $environment)
isApplicable(Setup\Environment $environment)
@inheritDoc
getPreconditions(Setup\Environment $environment)
__construct(string $plugin_name)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilRbacAdmin Core functions for role based access control.
class ilRbacReview Contains Review functions of core Rbac.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
An environment holds resources to be used in the setup process.
getResource(string $id)
Consumers of this method should check if the result is what they expect, e.g.
An objective is a desired state of the system that is supposed to be created by the setup.
Readable part of repository interface to ilComponentDataDB.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...