19 declare(strict_types=1);
60 return $this->
renderer->render($this->
ui->table()->presentation(
65 ->withHeadline($record->
getName())
69 $ui_factory->listing()->descriptive($this->
getContent($record))
82 $fields[] = $this->
lng->txt(
"installed");
84 $fields[] = $this->
lng->txt(
"not_installed");
88 $fields[] = $this->
lng->txt(
"cmps_active");
90 $fields[] = $this->
lng->txt(
"inactive");
94 $fields[] = $this->
lng->txt(
"cmps_needs_update");
106 $this->
lng->txt(
"cmps_id") => $plugin_info->
getId(),
107 $this->
lng->txt(
"cmps_plugin_slot") => $plugin_info->
getPluginSlot()->getName(),
124 return $this->
lng->txt(
"yes");
126 return $this->
lng->txt(
"no");
135 $active_filters = array_filter($this->
filter,
static function ($value):
bool {
136 return !empty($value);
138 $plugins = array_filter($data,
static function (
ilPluginInfo $plugin_info) use ($active_filters):
bool {
139 $matches_filter =
true;
140 if (isset($active_filters[self::F_PLUGIN_NAME])) {
141 $matches_filter = strpos($plugin_info->
getName(), $active_filters[self::F_PLUGIN_NAME]) !==
false;
143 if (isset($active_filters[self::F_PLUGIN_ID])) {
144 $matches_filter = strpos($plugin_info->
getId(), $active_filters[self::F_PLUGIN_ID]) !==
false;
146 if (isset($active_filters[self::F_PLUGIN_ACTIVE])) {
147 $v = (
int) $active_filters[self::F_PLUGIN_ACTIVE] === 1;
148 $matches_filter = $plugin_info->
isActive() === $v && $matches_filter;
150 if (isset($active_filters[self::F_SLOT_NAME])) {
151 $matches_filter = $matches_filter && in_array(
153 $active_filters[self::F_SLOT_NAME],
157 if (isset($active_filters[self::F_COMPONENT_NAME])) {
158 $matches_filter = $matches_filter && in_array(
160 $active_filters[self::F_COMPONENT_NAME],
165 return $matches_filter;
173 $clone = clone $this;
174 $clone->data =
$data;
192 return $this->
ui->dropdown()->standard($items);
196 $items[] = $this->
ui->button()->shy(
197 $this->
lng->txt(
"cmps_configure"),
198 $this->
ctrl->getLinkTargetByClass(
205 if ($this->
hasLang($plugin_info)) {
225 return $this->
ui->dropdown()->standard($items);
247 return $this->
ui->button()->shy(
248 $this->
lng->txt($caption),
249 $this->
ctrl->getLinkTarget($this->parent_gui, $command)
256 return $language_handler->hasAvailableLangFiles();
getImportantFields(ilPluginInfo $plugin_info)
hasLang(ilPluginInfo $plugin_info)
ilObjComponentSettingsGUI $parent_gui
getActions(ilPluginInfo $plugin_info)
isActive()
Is this plugin active right now?
getContent(ilPluginInfo $plugin_info)
const CMD_DEACTIVATE_PLUGIN
__construct(ilObjComponentSettingsGUI $parent_gui, ilCtrl $ctrl, Factory $ui, Renderer $renderer, ilLanguage $lng, array $filter)
const CMD_CONFIRM_UNINSTALL_PLUGIN
isInstalled()
"Installed" tells if the plugin has some installed version.
isActivationPossible()
Can this plugin be activated right now.
This describes commonalities between all types of Dropdowns.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
isUpdateRequired()
"Update required" tells if the plugin needs an update.
setParameter(ilPluginInfo $plugin)
This is how the factory for UI elements looks.
const CMD_ACTIVATE_PLUGIN
Simple value class for information about a plugin.
ilObjComponentSettingsGUI: ilPermissionGUI
boolToString(bool $value)
filter(string $filter_id, $class_path, string $cmd, bool $activated=true, bool $expanded=true)
supportsLearningProgress()
getDropdownButton(string $caption, string $command)
const CMD_REFRESH_LANGUAGES