◆ __construct()
ilComponentUpdatePluginObjective::__construct |
( |
string |
$plugin_name | ) |
|
◆ achieve()
ilComponentUpdatePluginObjective::achieve |
( |
Setup\Environment |
$environment | ) |
|
Definition at line 80 of file class.ilComponentUpdatePluginObjective.php.
References $GLOBALS, XapiProxy\$plugin, ILIAS\Setup\Environment\getResource(), and initEnvironment().
82 $component_repository = $environment->getResource(Setup\Environment::RESOURCE_COMPONENT_REPOSITORY);
83 $component_factory = $environment->getResource(Setup\Environment::RESOURCE_COMPONENT_FACTORY);
84 $info = $component_repository->getPluginByName($this->plugin_name);
86 if (!$info->supportsCLISetup()) {
87 throw new \RuntimeException(
88 "Plugin $this->plugin_name does not support command line setup." 92 if (!$info->isUpdateRequired()) {
93 throw new \RuntimeException(
94 "Plugin $this->plugin_name is already updated." 98 [$ORIG_DIC, $ORIG_ilDB] = $this->
initEnvironment($environment, $component_repository, $component_factory);
99 $plugin = $component_factory->getPlugin($info->getId());
initEnvironment(Setup\Environment $environment, \ilComponentRepository $component_repository, \ilComponentFactory $component_factory)
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
◆ getHash()
ilComponentUpdatePluginObjective::getHash |
( |
| ) |
|
◆ getLabel()
ilComponentUpdatePluginObjective::getLabel |
( |
| ) |
|
◆ getPreconditions()
ilComponentUpdatePluginObjective::getPreconditions |
( |
Setup\Environment |
$environment | ) |
|
Definition at line 65 of file class.ilComponentUpdatePluginObjective.php.
69 new \ilIniFilesLoadedObjective(),
70 new \ilDatabaseInitializedObjective(),
71 new \ilComponentPluginAdminInitObjective(),
72 new \ilComponentRepositoryExistsObjective(),
73 new \ilComponentFactoryExistsObjective()
Read the client id of the installation from the data directory.
◆ initEnvironment()
Definition at line 118 of file class.ilComponentUpdatePluginObjective.php.
References Vendor\Package\$a, $GLOBALS, $ini, __construct(), ILIAS\UI\examples\MessageBox\Info\info(), and ilLogLevel\INFO.
Referenced by achieve().
123 $db = $environment->getResource(Setup\Environment::RESOURCE_DATABASE);
124 $plugin_admin = $environment->getResource(Setup\Environment::RESOURCE_PLUGIN_ADMIN);
125 $ini = $environment->getResource(Setup\Environment::RESOURCE_ILIAS_INI);
126 $client_ini = $environment->getResource(Setup\Environment::RESOURCE_CLIENT_INI);
135 $GLOBALS[
"DIC"] =
new DI\Container();
136 $GLOBALS[
"DIC"][
"component.repository"] = $component_repository;
137 $GLOBALS[
"DIC"][
"component.factory"] = $component_factory;
141 $GLOBALS[
"DIC"][
"ilClientIniFile"] = $client_ini;
146 public function isHandling(
int $a_level): bool
150 public function log(
string $a_message,
int $a_level =
ilLogLevel::INFO): void
156 public function debug(
string $a_message, array $a_context = array()): void
159 public function info(
string $a_message): void
162 public function notice(
string $a_message): void
165 public function warning(
string $a_message): void
168 public function error(
string $a_message): void
171 public function critical(
string $a_message): void
174 public function alert(
string $a_message): void
177 public function emergency(
string $a_message): void
183 public function writeLanguageLog(
string $a_topic,
string $a_lang_key): void
186 public function logStack(?
int $a_level = null,
string $a_message =
''): void
189 public function writeMemoryPeakUsage(
int $a_level): void
200 public function info($msg): void
203 public function warning($msg): void
206 public function error($msg): void
209 public function debug($msg,
$a = []): void
220 public static function getRootLogger():
ilLogger 224 public static function getLogger(
string $a_component_id):
ilLogger 232 $GLOBALS[
"DIC"][
"ilPluginAdmin"] = $plugin_admin;
244 public function raise($a_component, $a_event, $a_parameter =
""):
void 261 public array $prefs = [];
265 $this->prefs[
"language"] =
"en";
269 if (!defined(
'DEBUG')) {
270 define(
'DEBUG',
false);
273 if (!defined(
'SYSTEM_ROLE_ID')) {
274 define(
'SYSTEM_ROLE_ID',
'2');
277 if (!defined(
"ILIAS_ABSOLUTE_PATH")) {
278 define(
"ILIAS_ABSOLUTE_PATH", dirname(__FILE__, 5));
281 if (!defined(
"CLIENT_ID")) {
282 define(
'CLIENT_ID', $client_ini->readVariable(
'client',
'name'));
285 if (!defined(
"ILIAS_WEB_DIR")) {
286 define(
'ILIAS_WEB_DIR', dirname(__DIR__, 4) .
"/data/");
294 return [$ORIG_DIC, $ORIG_ilDB];
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
__construct(string $plugin_name)
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples
Class ilRbacAdmin Core functions for role based access control.
◆ isApplicable()
ilComponentUpdatePluginObjective::isApplicable |
( |
Setup\Environment |
$environment | ) |
|
◆ isNotable()
ilComponentUpdatePluginObjective::isNotable |
( |
| ) |
|
◆ $plugin_name
ilComponentUpdatePluginObjective::$plugin_name |
|
protected |
The documentation for this class was generated from the following file: