ILIAS  release_7 Revision v7.30-3-g800a261c036
ilComponentPluginLanguageUpdatedObjective Class Reference
+ Inheritance diagram for ilComponentPluginLanguageUpdatedObjective:
+ Collaboration diagram for ilComponentPluginLanguageUpdatedObjective:

Public Member Functions

 __construct (string $plugin_name)
 
 getHash ()
 
 getLabel ()
 
 isNotable ()
 
 getPreconditions (Setup\Environment $environment)
 
 achieve (Setup\Environment $environment)
 
 isApplicable (Setup\Environment $environment)
 @inheritDoc More...
 

Protected Member Functions

 initEnvironment (Setup\Environment $environment)
 

Protected Attributes

 $plugin_name
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilComponentPluginLanguageUpdatedObjective::__construct ( string  $plugin_name)

Definition at line 12 of file class.ilComponentPluginLanguageUpdatedObjective.php.

References $plugin_name.

Referenced by initEnvironment().

+ Here is the caller graph for this function:

Member Function Documentation

◆ achieve()

ilComponentPluginLanguageUpdatedObjective::achieve ( Setup\Environment  $environment)

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

54 : Setup\Environment
55 {
56 list($ORIG_DIC, $ORIG_ilDB) = $this->initEnvironment($environment);
57
58 $plugin = $GLOBALS["DIC"]["ilPluginAdmin"]->getRawPluginDataFor($this->plugin_name);
59
61 $plugin['component_type'],
62 $plugin['component_name'],
63 $plugin['slot_id'],
64 $plugin['name']
65 );
66
67 $pl->updateLanguages();
68
69
70 $GLOBALS["DIC"] = $ORIG_DIC;
71 $GLOBALS["ilDB"] = $ORIG_ilDB;
72
73 return $environment;
74 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
static getPluginObject(string $a_ctype, string $a_cname, string $a_slot_id, string $a_pname)

References $GLOBALS, XapiProxy\$plugin, ilPlugin\getPluginObject(), and initEnvironment().

+ Here is the call graph for this function:

◆ getHash()

ilComponentPluginLanguageUpdatedObjective::getHash ( )

Definition at line 20 of file class.ilComponentPluginLanguageUpdatedObjective.php.

20 : string
21 {
22 return hash("sha256", self::class . $this->plugin_name);
23 }

◆ getLabel()

ilComponentPluginLanguageUpdatedObjective::getLabel ( )

Definition at line 28 of file class.ilComponentPluginLanguageUpdatedObjective.php.

28 : string
29 {
30 return "Update plugin language $this->plugin_name.";
31 }

◆ getPreconditions()

ilComponentPluginLanguageUpdatedObjective::getPreconditions ( Setup\Environment  $environment)

◆ initEnvironment()

ilComponentPluginLanguageUpdatedObjective::initEnvironment ( Setup\Environment  $environment)
protected

Definition at line 95 of file class.ilComponentPluginLanguageUpdatedObjective.php.

95 : array
96 {
97 $db = $environment->getResource(Setup\Environment::RESOURCE_DATABASE);
98 $plugin_admin = $environment->getResource(Setup\Environment::RESOURCE_PLUGIN_ADMIN);
99 $ini = $environment->getResource(Setup\Environment::RESOURCE_ILIAS_INI);
100 $client_ini = $environment->getResource(Setup\Environment::RESOURCE_CLIENT_INI);
101
102
103 // ATTENTION: This is a total abomination. It only exists to allow various
104 // sub components of the various readers to run. This is a memento to the
105 // fact, that dependency injection is something we want. Currently, every
106 // component could just service locate the whole world via the global $DIC.
107 $ORIG_DIC = $GLOBALS["DIC"];
108 $ORIG_ilDB = $GLOBALS["ilDB"];
109
110 $GLOBALS["DIC"] = new DI\Container();
111 $GLOBALS["DIC"]["ilDB"] = $db;
112 $GLOBALS["ilDB"] = $db;
113 $GLOBALS["DIC"]["ilIliasIniFile"] = $ini;
114 $GLOBALS["DIC"]["ilClientIniFile"] = $client_ini;
115 $GLOBALS["DIC"]["ilLogger"] = new class() extends ilLogger {
116 public function __construct()
117 {
118 }
119 public function isHandling($a_level)
120 {
121 return true;
122 }
123 public function log($a_message, $a_level = ilLogLevel::INFO)
124 {
125 }
126 public function dump($a_variable, $a_level = ilLogLevel::INFO)
127 {
128 }
129 public function debug($a_message, $a_context = array())
130 {
131 }
132 public function info($a_message)
133 {
134 }
135 public function notice($a_message)
136 {
137 }
138 public function warning($a_message)
139 {
140 }
141 public function error($a_message)
142 {
143 }
144 public function critical($a_message)
145 {
146 }
147 public function alert($a_message)
148 {
149 }
150 public function emergency($a_message)
151 {
152 }
153 public function write($a_message, $a_level = ilLogLevel::INFO)
154 {
155 }
156 public function writeLanguageLog($a_topic, $a_lang_key)
157 {
158 }
159 public function logStack($a_level = null, $a_message = '')
160 {
161 }
162 public function writeMemoryPeakUsage($a_level)
163 {
164 }
165 };
166 $GLOBALS["DIC"]["ilLog"] = new class() extends ilLog {
167 public function __construct()
168 {
169 }
170 public function write($m, $l = ilLogLevel::INFO)
171 {
172 }
173 public function info($msg)
174 {
175 }
176 public function warning($msg)
177 {
178 }
179 public function error($msg)
180 {
181 }
182 public function debug($msg, $a = [])
183 {
184 }
185 public function dump($msg, $a = ilLogLevel::INFO)
186 {
187 }
188 };
189 $GLOBALS["DIC"]["ilLoggerFactory"] = new class() extends ilLoggerFactory {
190 public function __construct()
191 {
192 }
193 public static function getRootLogger()
194 {
195 return $GLOBALS["DIC"]["ilLogger"];
196 }
197 public static function getLogger($a)
198 {
199 return $GLOBALS["DIC"]["ilLogger"];
200 }
201 };
202 $GLOBALS["ilLog"] = $GLOBALS["DIC"]["ilLog"];
203 $GLOBALS["DIC"]["ilBench"] = null;
204 $GLOBALS["DIC"]["lng"] = new ilLanguage('en');
205 $GLOBALS["DIC"]["ilPluginAdmin"] = $plugin_admin;
206 $GLOBALS["DIC"]["ilCtrl"] = new ilCtrl();
207 $GLOBALS["DIC"]["ilias"] = null;
208 $GLOBALS["DIC"]["ilErr"] = null;
209 $GLOBALS["DIC"]["tree"] = new class() extends ilTree {
210 public function __construct()
211 {
212 }
213 };
214 $GLOBALS["DIC"]["ilAppEventHandler"] = new class() extends ilAppEventHandler {
215 public function __construct()
216 {
217 }
218 public function raise($a_component, $a_event, $a_parameter = "") : void
219 {
220 }
221 };
222 $GLOBALS["DIC"]["ilObjDataCache"] = new ilObjectDataCache();
223 $GLOBALS["DIC"]["ilSetting"] = new ilSetting();
224 $GLOBALS["DIC"]["objDefinition"] = new ilObjectDefinition();
225 $GLOBALS["DIC"]["rbacadmin"] = new class() extends ilRbacAdmin {
226 public function __construct()
227 {
228 }
229 };
230 $GLOBALS["DIC"]["rbacreview"] = new class() extends ilRbacReview {
231 public function __construct()
232 {
233 }
234 };
235 $GLOBALS["DIC"]["ilUser"] = new class() extends ilObjUser {
236 public $prefs = [];
237
238 public function __construct()
239 {
240 $this->prefs["language"] = "en";
241 }
242 };
243
244 if (!defined('DEBUG')) {
245 define('DEBUG', false);
246 }
247
248 if (!defined("ILIAS_ABSOLUTE_PATH")) {
249 define("ILIAS_ABSOLUTE_PATH", dirname(__FILE__, 5));
250 }
251
252 if (!defined('SYSTEM_ROLE_ID')) {
253 define('SYSTEM_ROLE_ID', '2');
254 }
255
256 if (!defined("CLIENT_ID")) {
257 define('CLIENT_ID', $client_ini->readVariable('client', 'name'));
258 }
259
260 if (!defined("ILIAS_WEB_DIR")) {
261 define('ILIAS_WEB_DIR', dirname(__DIR__, 4) . "/data/");
262 }
263
264 return [$ORIG_DIC, $ORIG_ilDB];
265 }
error($a_errmsg)
set error message @access public
Global event handler.
This class provides processing control methods.
language handling
logging
Definition: class.ilLog.php:19
Component logger with individual log levels by component id.
class ilObjectDataCache
parses the objects.xml it handles the xml-description of all ilias objects
Class ilRbacAdmin Core functions for role based access control.
class ilRbacReview Contains Review functions of core Rbac.
ILIAS Setting Class.
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples
$ini
Definition: raiseError.php:4
info()
Definition: info.php:2

References Vendor\Package\$a, $GLOBALS, $ini, __construct(), error(), ilLogLevel\INFO, and info().

Referenced by achieve(), and isApplicable().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isApplicable()

ilComponentPluginLanguageUpdatedObjective::isApplicable ( Setup\Environment  $environment)

@inheritDoc

Definition at line 79 of file class.ilComponentPluginLanguageUpdatedObjective.php.

79 : bool
80 {
81 list($ORIG_DIC, $ORIG_ilDB) = $this->initEnvironment($environment);
82
83 $plugin = $GLOBALS["DIC"]["ilPluginAdmin"]->getRawPluginDataFor($this->plugin_name);
84
85 if (is_null($plugin) || !$plugin['supports_cli_setup']) {
86 return false;
87 }
88
89 $GLOBALS["DIC"] = $ORIG_DIC;
90 $GLOBALS["ilDB"] = $ORIG_ilDB;
91
92 return true;
93 }

References $GLOBALS, XapiProxy\$plugin, and initEnvironment().

+ Here is the call graph for this function:

◆ isNotable()

ilComponentPluginLanguageUpdatedObjective::isNotable ( )

Definition at line 36 of file class.ilComponentPluginLanguageUpdatedObjective.php.

36 : bool
37 {
38 return true;
39 }

Field Documentation

◆ $plugin_name

ilComponentPluginLanguageUpdatedObjective::$plugin_name
protected

Definition at line 10 of file class.ilComponentPluginLanguageUpdatedObjective.php.

Referenced by __construct().


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