20 declare(strict_types=1);
61 return $this->renderer->render($this->
ui->table()->presentation(
66 ->withHeadline($record->
getName())
70 $ui_factory->listing()->descriptive($this->
getContent($record))
83 $fields[] = $this->
lng->txt(
"installed");
85 $fields[] = $this->
lng->txt(
"not_installed");
89 $fields[] = $this->
lng->txt(
"cmps_active");
91 $fields[] = $this->
lng->txt(
"inactive");
95 $fields[] = $this->
lng->txt(
"cmps_needs_update");
107 $this->
lng->txt(
"cmps_id") => $plugin_info->
getId(),
108 $this->
lng->txt(
"cmps_plugin_slot") => $plugin_info->
getPluginSlot()->getName(),
125 return $this->
lng->txt(
"yes");
127 return $this->
lng->txt(
"no");
136 $active_filters = array_filter($this->
filter,
static function ($value):
bool {
137 return !empty($value);
139 $plugins = array_filter($data,
static function (
ilPluginInfo $plugin_info) use ($active_filters):
bool {
140 $matches_filter =
true;
141 if (isset($active_filters[self::F_PLUGIN_NAME])) {
142 $matches_filter = strpos($plugin_info->
getName(), $active_filters[self::F_PLUGIN_NAME]) !==
false;
144 if (isset($active_filters[self::F_PLUGIN_ID])) {
145 $matches_filter = strpos($plugin_info->
getId(), $active_filters[self::F_PLUGIN_ID]) !==
false;
147 if (isset($active_filters[self::F_PLUGIN_ACTIVE])) {
148 $v = (
int) $active_filters[self::F_PLUGIN_ACTIVE] === 1;
149 $matches_filter = $plugin_info->
isActive() === $v && $matches_filter;
151 if (isset($active_filters[self::F_SLOT_NAME])) {
152 $matches_filter = $matches_filter && in_array(
154 $active_filters[self::F_SLOT_NAME],
158 if (isset($active_filters[self::F_COMPONENT_NAME])) {
159 $matches_filter = $matches_filter && in_array(
161 $active_filters[self::F_COMPONENT_NAME],
166 return $matches_filter;
174 $clone = clone $this;
175 $clone->data =
$data;
193 return $this->
ui->dropdown()->standard($items);
197 $items[] = $this->
ui->button()->shy(
198 $this->
lng->txt(
"cmps_configure"),
199 $this->
ctrl->getLinkTargetByClass(
206 if ($this->
hasLang($plugin_info)) {
226 return $this->
ui->dropdown()->standard($items);
248 return $this->
ui->button()->shy(
249 $this->
lng->txt($caption),
250 $this->
ctrl->getLinkTarget($this->parent_gui, $command)
257 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.
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