◆ achieve()
| ilDatabaseUpdatedObjective::achieve |
( |
Setup\Environment |
$environment | ) |
|
Definition at line 54 of file class.ilDatabaseUpdatedObjective.php.
References $client_id, $DIC, $GLOBALS, $ini, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Setup\Environment\getResource(), and ILIAS\UI\examples\MessageBox\Info\info().
56 $db = $environment->getResource(
Setup\Environment::RESOURCE_DATABASE);
57 $io = $environment->getResource(
Setup\Environment::RESOURCE_ADMIN_INTERACTION);
58 $ini = $environment->getResource(
Setup\Environment::RESOURCE_ILIAS_INI);
59 $client_ini = $environment->getResource(
Setup\Environment::RESOURCE_CLIENT_INI);
60 $client_id = $environment->getResource(
Setup\Environment::RESOURCE_CLIENT_ID);
68 $GLOBALS[
"DIC"] =
new DI\Container();
72 $GLOBALS[
"DIC"][
"ilLog"] =
new class ($io) {
79 public function write(): void
83 public function info(): void
87 public function warning($msg): void
89 $this->io->inform($msg);
92 public function error($msg): void
94 throw new Setup\UnachievableException(
95 "Problem in DB-Update: $msg" 100 $GLOBALS[
"DIC"][
"ilLoggerFactory"] =
new class () {
101 public function getRootLogger():
object 103 return new class () {
104 public function write(): void
110 $GLOBALS[
"ilCtrlStructureReader"] =
new class () {
111 public function getStructure(): void
115 public function setIniFile(): void
119 if (!defined(
"CLIENT_DATA_DIR")) {
120 define(
"CLIENT_DATA_DIR",
$ini->readVariable(
"clients",
"datadir") .
"/" .
$client_id);
122 if (!defined(
"CLIENT_WEB_DIR")) {
123 define(
"CLIENT_WEB_DIR", dirname(__DIR__, 5) .
"/public/data/" .
$client_id);
125 if (!defined(
"ILIAS_ABSOLUTE_PATH")) {
126 define(
"ILIAS_ABSOLUTE_PATH", dirname(__FILE__, 6));
128 if (!defined(
"ILIAS_LOG_ENABLED")) {
129 define(
"ILIAS_LOG_ENABLED",
false);
131 if (!defined(
"ROOT_FOLDER_ID")) {
132 define(
"ROOT_FOLDER_ID", (
int) $client_ini->readVariable(
"system",
"ROOT_FOLDER_ID"));
134 if (!defined(
"ROLE_FOLDER_ID")) {
135 define(
"ROLE_FOLDER_ID", (
int) $client_ini->readVariable(
"system",
"ROLE_FOLDER_ID"));
137 if (!defined(
"SYSTEM_FOLDER_ID")) {
138 define(
"SYSTEM_FOLDER_ID", (
int) $client_ini->readVariable(
"system",
"SYSTEM_FOLDER_ID"));
142 $db_update->applyCustomUpdates();
info()
description: > Example for rendering a info message box.
__construct(Container $dic, ilPlugin $plugin)
◆ getHash()
| ilDatabaseUpdatedObjective::getHash |
( |
| ) |
|
◆ getLabel()
| ilDatabaseUpdatedObjective::getLabel |
( |
| ) |
|
◆ getPreconditions()
| ilDatabaseUpdatedObjective::getPreconditions |
( |
Setup\Environment |
$environment | ) |
|
◆ isApplicable()
| ilDatabaseUpdatedObjective::isApplicable |
( |
Setup\Environment |
$environment | ) |
|
◆ isNotable()
| ilDatabaseUpdatedObjective::isNotable |
( |
| ) |
|
The documentation for this class was generated from the following file: