19declare(strict_types=1);
64 throw new \InvalidArgumentException(
65 "If there is no current version for the plugin, we also should not " .
94 return $this->pluginslot->getComponent();
114 return implode(
'/', [
125 return "il" . $this->
getName() .
"Plugin";
130 return "il" . $this->
getName() .
"ConfigGUI";
197 return $this->current_version !==
null;
205 return $this->
isInstalled() && !$this->current_version->equals($this->available_version);
214 return $this->current_version->isGreaterThan($this->available_version);
224 $this->actual_ilias_version->isGreaterThanOrEquals($this->minimum_ilias_version)
225 && $this->actual_ilias_version->isSmallerThanOrEquals($this->maximum_ilias_version);
257 throw new \LogicException(
258 "Plugin is active, so no reason for inactivity."
263 return "cmps_needs_matching_ilias_version";
267 return "cmps_must_installed";
271 return "cmps_needs_upgrade";
275 return "cmps_needs_update";
279 return "cmps_not_activated";
282 throw new \LogicException(
283 "Unknown reason for inactivity of the plugin."
A version number that consists of three numbers (major, minor, patch).
Simple value class for basic information about a component.
Simple value class for information about a plugin.
isInstalled()
"Installed" tells if the plugin has some installed version.
isActive()
Is this plugin active right now?
getReasonForInactivity()
Which is the reason for the inactivity?
Version $maximum_ilias_version
isCompliantToILIAS()
"ILIAS Version compliance" tells if the plugin can be operated with the given ILIAS version.
isActivationPossible()
Can this plugin be activated right now.
Version $available_version
bool $supports_learning_progress
ilPluginSlotInfo $pluginslot
isUpdateRequired()
"Update required" tells if the plugin needs an update.
Version $minimum_ilias_version
supportsLearningProgress()
isActivated()
"activated" tells if the administrator of the installation wants the plugin to be effective.
__construct(Version $actual_ilias_version, ilPluginSlotInfo $pluginslot, string $id, string $name, string $type, bool $activated, ?Version $current_version, ?int $current_db_version, Version $available_version, Version $minimum_ilias_version, Version $maximum_ilias_version, string $responsible, string $responsible_mail, bool $supports_learning_progress, bool $supports_export, bool $supports_cli_setup)
Version $actual_ilias_version
isVersionToOld()
"Version to old" tells if the plugin code has a version that is below the version that was updated la...
Simple value class for basic information about a pluginslot.