ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilPluginAdmin Class Reference

Administration class for plugins. More...

+ Collaboration diagram for ilPluginAdmin:

Public Member Functions

 __construct ()
 ilPluginAdmin constructor. More...
 
 getVersion ($a_ctype, $a_cname, $a_slot_id, $a_pname)
 Get version of plugin. More...
 
 getIliasMinVersion ($a_ctype, $a_cname, $a_slot_id, $a_pname)
 Get Ilias Min Version. More...
 
 getIliasMaxVersion ($a_ctype, $a_cname, $a_slot_id, $a_pname)
 Get Ilias Max Version. More...
 
 getId ($a_ctype, $a_cname, $a_slot_id, $a_pname)
 Get ID. More...
 
 isActive ($a_ctype, $a_cname, $a_slot_id, $a_pname)
 Checks whether plugin is active (include version checks) More...
 
 exists ($a_ctype, $a_cname, $a_slot_id, $a_pname)
 Checks whether plugin exists. More...
 
 needsUpdate ($a_ctype, $a_cname, $a_slot_id, $a_pname)
 Get version. More...
 
 getAllData ($a_ctype, $a_cname, $a_slot_id, $a_pname)
 Get all data from file in an array. More...
 
 hasLearningProgress ($a_ctype, $a_cname, $a_slot_id, $a_pname)
 Checks whether plugin has active learning progress. More...
 
 supportsExport ($a_ctype, $a_cname, $a_slot_id, $a_pname)
 Checks whether plugin supports export/import. More...
 

Static Public Member Functions

static getActivePluginsForSlot ($a_ctype, $a_cname, $a_slot_id)
 Get all active plugins for a slot. More...
 
static getPluginObject ($a_ctype, $a_cname, $a_slot_id, $a_pname)
 Get Plugin Object. More...
 
static getAllPlugins ()
 Get info for all plugins. More...
 
static getActivePlugins ()
 Get info for all active plugins. More...
 
static isPluginActive ($id)
 Check, if a plugin is active. More...
 
static getPluginObjectById ($id)
 Get a plugin-object by id. More...
 
static getAllGlobalScreenProviders ()
 

Static Public Attributes

static $active_plugins = array()
 

Protected Member Functions

 pluginSupportCurrentILIAS (array &$plugin_data)
 Plugin supports current ILIAS. More...
 
 updateRequired (array &$plugin_data, $last_update_version)
 Should the plugin be updated. More...
 
 setMustInstall (array &$plugin_data)
 Set plugin data for intall. More...
 
 setCurrentState (array &$plugin_data, $active)
 Set current state to static values, excluding active and activatoin possible. More...
 
 parsePluginPhp ($plugin_php_file)
 Get informations from plugin php file. More...
 

Protected Attributes

 $data
 
 $got_data = false
 
 $lng
 

Static Protected Attributes

static $plugin_objects = array()
 

Private Member Functions

 getPluginData ($a_ctype, $a_cname, $a_slot_id, $a_pname)
 Get basic data of plugin from plugin.php. More...
 

Detailed Description

Administration class for plugins.

Handles basic data from plugin.php files.

This class currently needs refactoring. There are a lot of methods which are related to some specific slots.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Fabian Schmid fs@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch

Definition at line 17 of file class.ilPluginAdmin.php.

Constructor & Destructor Documentation

◆ __construct()

ilPluginAdmin::__construct ( )

ilPluginAdmin constructor.

Definition at line 49 of file class.ilPluginAdmin.php.

50 {
51 global $DIC;
52 $this->lng = $DIC->language();
53 $this->lng->loadLanguageModule("cmps");
54 }
$DIC
Definition: xapitoken.php:46

References $DIC.

Member Function Documentation

◆ exists()

ilPluginAdmin::exists (   $a_ctype,
  $a_cname,
  $a_slot_id,
  $a_pname 
)

Checks whether plugin exists.

Parameters
string$a_ctypeComponent Type
string$a_cnameComponent Name
string$a_slot_idSlot ID
string$a_pnamePlugin Name
Returns
bool
Exceptions
ilPluginException

Definition at line 363 of file class.ilPluginAdmin.php.

364 {
365 $this->getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
366
367 return isset($this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname]);
368 }
getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get basic data of plugin from plugin.php.

References getPluginData().

+ Here is the call graph for this function:

◆ getActivePlugins()

static ilPluginAdmin::getActivePlugins ( )
static

Get info for all active plugins.

Returns
array

Definition at line 539 of file class.ilPluginAdmin.php.

540 {
541 static $active_plugins;
542 if (!isset($active_plugins)) {
543 $cached_component = ilCachedComponentData::getInstance();
544 $plugins = $cached_component->getIlPluginActive();
545 $buf = array();
546 foreach ($plugins as $slot => $plugs) {
547 $buf[] = $plugs;
548 }
549
550 $active_plugins = array_merge([], ...$buf);
551 }
552
553 return $active_plugins;
554 }

References $active_plugins, and ilCachedComponentData\getInstance().

Referenced by ilInitialisation\initUIFramework().

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

◆ getActivePluginsForSlot()

static ilPluginAdmin::getActivePluginsForSlot (   $a_ctype,
  $a_cname,
  $a_slot_id 
)
static

Get all active plugins for a slot.

Parameters
string$a_ctype
string$a_cname
string$a_slot_id
Returns
array

Definition at line 418 of file class.ilPluginAdmin.php.

419 {
420 // cache the list of active plugins
421 if (!isset(self::$active_plugins[$a_ctype][$a_cname][$a_slot_id])) {
422 self::$active_plugins[$a_ctype][$a_cname][$a_slot_id]
423 = ilPlugin::getActivePluginsForSlot($a_ctype, $a_cname, $a_slot_id);
424 }
425
426 return self::$active_plugins[$a_ctype][$a_cname][$a_slot_id];
427 }
static getActivePluginsForSlot(string $a_ctype, string $a_cname, string $a_slot_id)

References ilPlugin\getActivePluginsForSlot().

Referenced by ilDclPluginFieldRepresentation\buildFieldCreationInput().

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

◆ getAllData()

ilPluginAdmin::getAllData (   $a_ctype,
  $a_cname,
  $a_slot_id,
  $a_pname 
)

Get all data from file in an array.

Parameters
string$a_ctypeComponent Type
string$a_cnameComponent Name
string$a_slot_idSlot ID
string$a_pnamePlugin Name
Returns
array
Exceptions
ilPluginException

Definition at line 401 of file class.ilPluginAdmin.php.

402 {
403 $this->getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
404
405 return $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname];
406 }

References getPluginData().

+ Here is the call graph for this function:

◆ getAllGlobalScreenProviders()

static ilPluginAdmin::getAllGlobalScreenProviders ( )
static
Deprecated:
Returns
\ILIAS\GlobalScreen\Scope\MainMenu\Provider\AbstractStaticPluginMainMenuProvider[]

Definition at line 607 of file class.ilPluginAdmin.php.

607 : array
608 {
609 $providers = array();
610 // return array(); // current fix
611 foreach (self::getActivePlugins() as $plugin) {
612 $pl = self::getPluginObjectById($plugin['plugin_id']);
613 if ($pl->isActive()) {
614 array_push($providers, $pl->promoteGlobalScreenProvider());
615 }
616 }
617
618 return $providers;
619 }
static getPluginObjectById($id)
Get a plugin-object by id.

References XapiProxy\$plugin, and getPluginObjectById().

Referenced by ilGSProviderFactory\appendPlugins().

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

◆ getAllPlugins()

static ilPluginAdmin::getAllPlugins ( )
static

Get info for all plugins.

Returns
array<string, array>

Definition at line 522 of file class.ilPluginAdmin.php.

523 {
524 static $all_plugins;
525 if (!isset($all_plugins)) {
526 $cached_component = ilCachedComponentData::getInstance();
527 $all_plugins = $cached_component->getIlPluginById();
528 }
529
530 return $all_plugins;
531 }

References ilCachedComponentData\getInstance().

Referenced by getPluginObjectById().

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

◆ getId()

ilPluginAdmin::getId (   $a_ctype,
  $a_cname,
  $a_slot_id,
  $a_pname 
)

Get ID.

Parameters
string$a_ctypeComponent Type
string$a_cnameComponent Name
string$a_slot_idSlot ID
string$a_pnamePlugin Name
Returns
string
Exceptions
ilPluginException

Definition at line 322 of file class.ilPluginAdmin.php.

323 {
324 $this->getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
325
326 return $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname]["id"];
327 }

References getPluginData().

+ Here is the call graph for this function:

◆ getIliasMaxVersion()

ilPluginAdmin::getIliasMaxVersion (   $a_ctype,
  $a_cname,
  $a_slot_id,
  $a_pname 
)

Get Ilias Max Version.

Parameters
string$a_ctypeComponent Type
string$a_cnameComponent Name
string$a_slot_idSlot ID
string$a_pnamePlugin Name
Returns
string
Exceptions
ilPluginException

Definition at line 303 of file class.ilPluginAdmin.php.

304 {
305 $this->getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
306
307 return $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname]["ilias_max_version"];
308 }

References getPluginData().

+ Here is the call graph for this function:

◆ getIliasMinVersion()

ilPluginAdmin::getIliasMinVersion (   $a_ctype,
  $a_cname,
  $a_slot_id,
  $a_pname 
)

Get Ilias Min Version.

Parameters
string$a_ctypeComponent Type
string$a_cnameComponent Name
string$a_slot_idSlot ID
string$a_pnamePlugin Name
Returns
string
Exceptions
ilPluginException

Definition at line 284 of file class.ilPluginAdmin.php.

285 {
286 $this->getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
287
288 return $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname]["ilias_min_version"];
289 }

References getPluginData().

+ Here is the call graph for this function:

◆ getPluginData()

ilPluginAdmin::getPluginData (   $a_ctype,
  $a_cname,
  $a_slot_id,
  $a_pname 
)
private

Get basic data of plugin from plugin.php.

Parameters
string$a_ctypeComponent Type
string$a_cnameComponent Name
string$a_slot_idSlot ID
string$a_pnamePlugin Name
Exceptions
ilPluginException

Definition at line 67 of file class.ilPluginAdmin.php.

68 {
69 if (!isset($this->got_data[$a_ctype][$a_cname][$a_slot_id][$a_pname])) {
70 $slot_name = ilPluginSlot::lookupSlotName($a_ctype, $a_cname, $a_slot_id);
71
72 $plugin_php_file = "./Customizing/global/plugins/" . $a_ctype . "/" . $a_cname . "/" . $slot_name . "/" . $a_pname . "/plugin.php";
73
74 if (!is_file($plugin_php_file)) {
75 throw new ilPluginException("No plugin.php file found for Plugin :" . $a_pname . ".");
76 }
77
78 $plugin_db_data = ilPlugin::getPluginRecord($a_ctype, $a_cname, $a_slot_id, $a_pname);
79 $plugin_data = $this->parsePluginPhp($plugin_php_file);
80
81 if ($plugin_db_data["plugin_id"] === null) {
82 $this->setMustInstall($plugin_data);
83 } else {
84 $this->setCurrentState($plugin_data, (bool) $plugin_db_data["active"]);
85 if ($this->pluginSupportCurrentILIAS($plugin_data)) {
86 $this->updateRequired($plugin_data, $plugin_db_data["last_update_version"]);
87 }
88 }
89
90 $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname] = $plugin_data;
91 $this->got_data[$a_ctype][$a_cname][$a_slot_id][$a_pname] = true;
92 }
93 }
parsePluginPhp($plugin_php_file)
Get informations from plugin php file.
updateRequired(array &$plugin_data, $last_update_version)
Should the plugin be updated.
setMustInstall(array &$plugin_data)
Set plugin data for intall.
setCurrentState(array &$plugin_data, $active)
Set current state to static values, excluding active and activatoin possible.
pluginSupportCurrentILIAS(array &$plugin_data)
Plugin supports current ILIAS.
static lookupSlotName($a_ctype, $a_cname, $a_slot_id)
Lookup slot name for component and slot id.
static getPluginRecord(string $a_ctype, string $a_cname, string $a_slot_id, string $a_pname)

References ilPlugin\getPluginRecord(), ilPluginSlot\lookupSlotName(), parsePluginPhp(), pluginSupportCurrentILIAS(), setCurrentState(), setMustInstall(), and updateRequired().

Referenced by exists(), getAllData(), getId(), getIliasMaxVersion(), getIliasMinVersion(), getVersion(), hasLearningProgress(), isActive(), needsUpdate(), and supportsExport().

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

◆ getPluginObject()

static ilPluginAdmin::getPluginObject (   $a_ctype,
  $a_cname,
  $a_slot_id,
  $a_pname 
)
static

Get Plugin Object.

Parameters
string$a_ctypeComponent Type
string$a_cnameComponent Name
string$a_slot_idSlot ID
string$a_pnamePlugin Name
Returns
ilPlugin the plugin

Definition at line 440 of file class.ilPluginAdmin.php.

441 {
442 // cache the plugin objects
443 if (!isset(self::$plugin_objects[$a_ctype][$a_cname][$a_slot_id][$a_pname])) {
444 self::$plugin_objects[$a_ctype][$a_cname][$a_slot_id][$a_pname]
445 = ilPlugin::getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname);
446 }
447
448 return self::$plugin_objects[$a_ctype][$a_cname][$a_slot_id][$a_pname];
449 }
static getPluginObject(string $a_ctype, string $a_cname, string $a_slot_id, string $a_pname)

References ilPlugin\getPluginObject().

Referenced by ilTestSignatureGUI\__construct(), ilTabsGUI\__getHTML(), ilStartUpGUI\_checkGoto(), ilTemplate\addBlockFile(), ilDclPluginFieldRepresentation\buildFieldCreationInput(), ilObjComponentSettingsGUI\executeCommand(), ilTemplate\get(), ilContainerGUI\getAsynchItemListObject(), getPluginObjectById(), ilInitialisation\initStyle(), ilInitialisation\initUIFramework(), ilRendererFactory\loadAvailableRenderers(), ilTemplate\loadTemplatefile(), ilDataCollectionGlobalTemplate\printToStdout(), ilCOPageGlobalTemplate\printToStdout(), ilRTEGlobalTemplate\printToStdout(), ilCtrl\redirectToURL(), ILIAS\Services\UICore\MetaTemplate\PageContentGUI\renderPage(), ilGlobalTemplate\renderPage(), and ilObjContentObjectGUI\setilLMMenu().

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

◆ getPluginObjectById()

static ilPluginAdmin::getPluginObjectById (   $id)
static

Get a plugin-object by id.

Parameters
string$idid of the plugin
Returns
ilPlugin
Exceptions
InvalidArgumentExceptionif no plugin with that id is found

Definition at line 585 of file class.ilPluginAdmin.php.

586 {
587 assert(is_string($id));
588 $plugs = self::getAllPlugins();
589 if (!array_key_exists($id, $plugs)) {
590 throw new \InvalidArgumentException("Plugin does not exist: " . $id, 1);
591 }
592 $pdata = $plugs[$id];
593
595 $pdata['component_type'],
596 $pdata['component_name'],
597 $pdata['slot_id'],
598 $pdata['name']
599 );
600 }
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get Plugin Object.
static getAllPlugins()
Get info for all plugins.

References getAllPlugins(), and getPluginObject().

Referenced by getAllGlobalScreenProviders().

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

◆ getVersion()

ilPluginAdmin::getVersion (   $a_ctype,
  $a_cname,
  $a_slot_id,
  $a_pname 
)

Get version of plugin.

Parameters
string$a_ctypeComponent Type
string$a_cnameComponent Name
string$a_slot_idSlot ID
string$a_pnamePlugin Name
Returns
string
Exceptions
ilPluginException

Definition at line 265 of file class.ilPluginAdmin.php.

266 {
267 $this->getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
268
269 return $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname]["version"];
270 }

References getPluginData().

+ Here is the call graph for this function:

◆ hasLearningProgress()

ilPluginAdmin::hasLearningProgress (   $a_ctype,
  $a_cname,
  $a_slot_id,
  $a_pname 
)

Checks whether plugin has active learning progress.

Parameters
string$a_ctypeComponent Type
string$a_cnameComponent Name
string$a_slot_idSlot ID
string$a_pnamePlugin Name
Returns
bool
Exceptions
ilPluginException

Definition at line 490 of file class.ilPluginAdmin.php.

491 {
492 $this->getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
493
494 return $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname]["learning_progress"];
495 }

References getPluginData().

+ Here is the call graph for this function:

◆ isActive()

ilPluginAdmin::isActive (   $a_ctype,
  $a_cname,
  $a_slot_id,
  $a_pname 
)

Checks whether plugin is active (include version checks)

Parameters
string$a_ctypeComponent Type
string$a_cnameComponent Name
string$a_slot_idSlot ID
string$a_pnamePlugin Name
Returns
bool

Definition at line 340 of file class.ilPluginAdmin.php.

341 {
342 try {
343 $this->getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
344 } catch (ilPluginException $e) {
345 return false;
346 }
347
348 return (bool) $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname]["is_active"];
349 }

References Vendor\Package\$e, and getPluginData().

+ Here is the call graph for this function:

◆ isPluginActive()

static ilPluginAdmin::isPluginActive (   $id)
static

Check, if a plugin is active.

Parameters
string$idid of the plugin
Returns
boolean

Definition at line 564 of file class.ilPluginAdmin.php.

565 {
566 assert(is_string($id));
567 $cached_component = ilCachedComponentData::getInstance();
568 $plugs = $cached_component->getIlPluginById();
569 if (array_key_exists($id, $plugs) && $plugs[$id]['active']) {
570 return true;
571 }
572
573 return false;
574 }

References ilCachedComponentData\getInstance().

+ Here is the call graph for this function:

◆ needsUpdate()

ilPluginAdmin::needsUpdate (   $a_ctype,
  $a_cname,
  $a_slot_id,
  $a_pname 
)

Get version.

Parameters
string$a_ctypeComponent Type
string$a_cnameComponent Name
string$a_slot_idSlot ID
string$a_pnamePlugin Name
Returns
bool
Exceptions
ilPluginException

Definition at line 382 of file class.ilPluginAdmin.php.

383 {
384 $this->getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
385
386 return (bool) $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname]["needs_update"];
387 }

References getPluginData().

+ Here is the call graph for this function:

◆ parsePluginPhp()

ilPluginAdmin::parsePluginPhp (   $plugin_php_file)
protected

Get informations from plugin php file.

Parameters
string$plugin_php_file
Returns
string[]

Definition at line 235 of file class.ilPluginAdmin.php.

236 {
237 include($plugin_php_file);
238
239 $values = [
240 "version" => $version,
241 "id" => $id,
242 "ilias_min_version" => $ilias_min_version,
243 "ilias_max_version" => $ilias_max_version,
244 "responsible" => $responsible,
245 "responsible_mail" => $responsible_mail,
246 "learning_progress" => (bool) $learning_progress,
247 "supports_export" => (bool) $supports_export,
248 ];
249
250 return $values;
251 }

Referenced by getPluginData().

+ Here is the caller graph for this function:

◆ pluginSupportCurrentILIAS()

ilPluginAdmin::pluginSupportCurrentILIAS ( array &  $plugin_data)
protected

Plugin supports current ILIAS.

Parameters
string[]&$plugin_data
Returns
bool

Definition at line 103 of file class.ilPluginAdmin.php.

104 {
105 if (ilComponent::isVersionGreaterString($plugin_data["ilias_min_version"], ILIAS_VERSION_NUMERIC)) {
106 $plugin_data["is_active"] = false;
107 $plugin_data["needs_update"] = false;
108 $plugin_data["activation_possible"] = false;
109
110 if ($this->lng instanceof ilLanguage) {
111 $inactive_reason = $this->lng->txt("cmps_needs_newer_ilias_version");
112 } else {
113 $inactive_reason = "Plugin needs a newer version of ILIAS.";
114 }
115 $plugin_data["inactive_reason"] = $inactive_reason;
116
117 return false;
118 }
119
120 if (ilComponent::isVersionGreaterString(ILIAS_VERSION_NUMERIC, $plugin_data["ilias_max_version"])) {
121 $plugin_data["is_active"] = false;
122 $plugin_data["needs_update"] = false;
123 $plugin_data["activation_possible"] = false;
124 if ($this->lng instanceof ilLanguage) {
125 $inactive_reason = $this->lng->txt("cmps_needs_newer_plugin_version");
126 } else {
127 $inactive_reason = "Plugin does not support current version of ILIAS. Newer version of plugin needed.";
128 }
129 $plugin_data["inactive_reason"] = $inactive_reason;
130
131 return false;
132 }
133
134 return true;
135 }
static isVersionGreaterString($a_ver1, $a_ver2)
language handling
const ILIAS_VERSION_NUMERIC

References ILIAS_VERSION_NUMERIC, and ilComponent\isVersionGreaterString().

Referenced by getPluginData().

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

◆ setCurrentState()

ilPluginAdmin::setCurrentState ( array &  $plugin_data,
  $active 
)
protected

Set current state to static values, excluding active and activatoin possible.

There will be set from db value $active

Parameters
string[]&$plugin_data
bool$active
Returns
void

Definition at line 218 of file class.ilPluginAdmin.php.

219 {
220 $plugin_data["is_active"] = $active;
221 $plugin_data["activation_possible"] = !$active;
222 $plugin_data["must_install"] = false;
223 $plugin_data["needs_update"] = false;
224 $plugin_data["inactive_reason"] = "";
225 }

Referenced by getPluginData().

+ Here is the caller graph for this function:

◆ setMustInstall()

ilPluginAdmin::setMustInstall ( array &  $plugin_data)
protected

Set plugin data for intall.

Parameters
string[]&$plugin_data
Returns
void

Definition at line 192 of file class.ilPluginAdmin.php.

193 {
194 $plugin_data["must_install"] = true;
195 $plugin_data["is_active"] = false;
196 $plugin_data["needs_update"] = false;
197 $plugin_data["activation_possible"] = false;
198
199 if ($this->lng instanceof ilLanguage) {
200 $inactive_reason = $this->lng->txt("cmps_must_installed");
201 } else {
202 $inactive_reason = "Plugin must be installed.";
203 }
204 $plugin_data["inactive_reason"] = $inactive_reason;
205 }

Referenced by getPluginData().

+ Here is the caller graph for this function:

◆ supportsExport()

ilPluginAdmin::supportsExport (   $a_ctype,
  $a_cname,
  $a_slot_id,
  $a_pname 
)

Checks whether plugin supports export/import.

Parameters
string$a_ctypeComponent Type
string$a_cnameComponent Name
string$a_slot_idSlot ID
string$a_pnamePlugin Name
Returns
bool
Exceptions
ilPluginException

Definition at line 509 of file class.ilPluginAdmin.php.

510 {
511 $this->getPluginData($a_ctype, $a_cname, $a_slot_id, $a_pname);
512
513 return $this->data[$a_ctype][$a_cname][$a_slot_id][$a_pname]["supports_export"];
514 }

References getPluginData().

+ Here is the call graph for this function:

◆ updateRequired()

ilPluginAdmin::updateRequired ( array &  $plugin_data,
  $last_update_version 
)
protected

Should the plugin be updated.

Parameters
string[]&$plugin_data
string$last_update_version
Returns
void

Definition at line 146 of file class.ilPluginAdmin.php.

147 {
148 if ($last_update_version == "") {
149 $plugin_data["is_active"] = false;
150 if ($this->lng instanceof ilLanguage) {
151 $inactive_reason = $this->lng->txt("cmps_needs_update");
152 } else {
153 $inactive_reason = "Update needed.";
154 }
155 $plugin_data["inactive_reason"] = $inactive_reason;
156 $plugin_data["needs_update"] = true;
157 $plugin_data["activation_possible"] = false;
158 } else {
159 if (ilComponent::isVersionGreaterString($last_update_version, $plugin_data["version"])) {
160 $plugin_data["is_active"] = false;
161 if ($this->lng instanceof ilLanguage) {
162 $inactive_reason = $this->lng->txt("cmps_needs_upgrade");
163 } else {
164 $inactive_reason = "Upgrade needed.";
165 }
166 $plugin_data["inactive_reason"] = $inactive_reason;
167 $plugin_data["activation_possible"] = false;
168 } else {
169 if ($last_update_version != $plugin_data["version"]) {
170 $plugin_data["is_active"] = false;
171 if ($this->lng instanceof ilLanguage) {
172 $inactive_reason = $this->lng->txt("cmps_needs_update");
173 } else {
174 $inactive_reason = "Update needed.";
175 }
176 $plugin_data["inactive_reason"] = $inactive_reason;
177 $plugin_data["needs_update"] = true;
178 $plugin_data["activation_possible"] = false;
179 }
180 }
181 }
182 }

References ilComponent\isVersionGreaterString().

Referenced by getPluginData().

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

Field Documentation

◆ $active_plugins

ilPluginAdmin::$active_plugins = array()
static

Definition at line 33 of file class.ilPluginAdmin.php.

Referenced by getActivePlugins().

◆ $data

ilPluginAdmin::$data
protected

Definition at line 23 of file class.ilPluginAdmin.php.

◆ $got_data

ilPluginAdmin::$got_data = false
protected

Definition at line 27 of file class.ilPluginAdmin.php.

◆ $lng

ilPluginAdmin::$lng
protected

Definition at line 43 of file class.ilPluginAdmin.php.

◆ $plugin_objects

ilPluginAdmin::$plugin_objects = array()
staticprotected

Definition at line 39 of file class.ilPluginAdmin.php.


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