19declare(strict_types=1);
60 return $this->
renderer->render($this->
ui->table()->presentation(
65 ->withHeadline($record->
getName())
67 ->withImportantFields($this->getImportantFields($record))
69 $ui_factory->listing()->descriptive($this->getContent($record))
71 ->withAction($this->getActions($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();
Builds a Color from either hex- or rgb values.
Class ilCtrl provides processing control methods.
@ilCtrl_Calls ilObjComponentSettingsGUI: ilPermissionGUI
const CMD_ACTIVATE_PLUGIN
const CMD_DEACTIVATE_PLUGIN
const CMD_REFRESH_LANGUAGES
const CMD_CONFIRM_UNINSTALL_PLUGIN
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?
isActivationPossible()
Can this plugin be activated right now.
isUpdateRequired()
"Update required" tells if the plugin needs an update.
supportsLearningProgress()
hasLang(ilPluginInfo $plugin_info)
getImportantFields(ilPluginInfo $plugin_info)
boolToString(bool $value)
__construct(ilObjComponentSettingsGUI $parent_gui, ilCtrl $ctrl, Factory $ui, Renderer $renderer, ilLanguage $lng, array $filter)
setParameter(ilPluginInfo $plugin)
getDropdownButton(string $caption, string $command)
ilObjComponentSettingsGUI $parent_gui
getContent(ilPluginInfo $plugin_info)
getActions(ilPluginInfo $plugin_info)
This describes commonalities between all types of Dropdowns.
This is how the factory for UI elements looks.
An entity that renders components to a string output.
filter(string $filter_id, $class_path, string $cmd, bool $activated=true, bool $expanded=true)