19 declare(strict_types=1);
41 private \ILIAS\UI\Component\Input\Container\Filter\Standard
$filter;
42 private \ILIAS\HTTP\Services
$http;
50 $this->
ctrl = $DIC->ctrl();
51 $this->
lng = $DIC->language();
52 $this->
lng->loadLanguageModule(
'file');
53 $this->ui_factory = $DIC->ui()->factory();
55 $this->storage = $DIC->resourceStorage();
56 $this->
http = $DIC->http();
57 $this->filter_service = $DIC->uiService()->filter();
66 $this->
filter = $this->filter_service->standard(
67 $this->gui::class .
'_filter7',
68 $this->
ctrl->getLinkTarget($this->gui),
70 'suffixes' => $this->ui_factory->input()->field()->text($this->
lng->txt(
'suffixes')),
71 'active' => $this->ui_factory->input()->field()->select($this->
lng->txt(
'status'), [
72 '1' => $this->
lng->txt(
'active'),
73 '0' => $this->
lng->txt(
'inactive'),
75 'is_default_icon' => $this->ui_factory->input()->field()->select($this->
lng->txt(
'default'), [
76 '1' => $this->
lng->txt(
'yes'),
77 '0' => $this->
lng->txt(
'no'),
98 $this->icon_repo->getIcons();
101 $filter_data = $this->filter_service->getData($this->
filter) ?? [];
103 foreach ($this->icon_repo->getIconsForFilter($filter_data) as $icon) {
104 $this->
ctrl->setParameterByClass(
105 ilObjFileIconsOverviewGUI::class,
109 $edit_target = $this->
ctrl->getLinkTargetByClass(
110 ilObjFileIconsOverviewGUI::class,
113 $change_activation_target = $this->
ctrl->getLinkTargetByClass(
114 ilObjFileIconsOverviewGUI::class,
119 $item_action_entries = [
120 $this->ui_factory->button()->shy(
121 $this->
lng->txt(
'de_activate_icon'),
122 $change_activation_target
125 if (!$icon->isDefaultIcon()) {
126 $item_action_entries[] = $this->ui_factory->button()->shy($this->
lng->txt(
'edit'), $edit_target);
127 $item_action_entries[] = $this->ui_factory->button()->shy($this->
lng->txt(
'delete'),
'#')->withOnClick(
128 $deletion_modal->getShowSignal()
131 $item_actions = $this->ui_factory->dropdown()->standard($item_action_entries);
133 $id = $this->storage->manage()->find($icon->getRid());
136 $icon_src = $this->storage->consume()->src(
$id)->getSrc();
139 $suffixes_array_into_string = $this->icon_repo->turnSuffixesArrayIntoString(
143 $icon_image = $this->ui_factory->symbol()->icon()->custom(
145 "Icon $suffixes_array_into_string" 146 )->withSize(
'large');
148 $icon_items[] = $this->ui_factory->item()
149 ->standard($this->
lng->txt(
'icon') .
" $suffixes_array_into_string")
150 ->withActions($item_actions)
153 $this->
lng->txt(
'active') => $icon->isActive() ? $this->
lng->txt(
155 ) : $this->
lng->txt(
'no'),
156 $this->
lng->txt(
'default') => $icon->isDefaultIcon(
157 ) ? $this->
lng->txt(
'yes') : $this->
lng->txt(
'no'),
160 ) => $suffixes_array_into_string
163 ->withLeadIcon($icon_image);
166 $this->icon_list = $this->ui_factory->panel()->listing()->standard(
167 $this->
lng->txt(
'suffix_specific_icons'),
168 [$this->ui_factory->item()->group(
"", $icon_items)]
187 $target = $this->
ctrl->getLinkTargetByClass(
188 ilObjFileIconsOverviewGUI::class,
191 $rid = $this->
refinery->kindlyTo()->string()->transform($a_icon->
getRid());
193 $id = $this->storage->manage()->find($rid);
196 $icon_src = $this->storage->consume()->src(
$id)->getSrc();
198 $img_icon = $this->ui_factory->image()->standard(
202 $txt_suffixes = $this->
lng->txt(
'suffixes') .
": " . $this->icon_repo->turnSuffixesArrayIntoString(
206 return $this->ui_factory->modal()->interruptive(
207 $this->
lng->txt(
"delete"),
208 $this->
lng->txt(
'msg_confirm_entry_deletion'),
210 )->withAffectedItems([
211 $this->ui_factory->modal()->interruptiveItem()->standard(
ILIAS Refinery Factory $refinery
ILIAS UI Component Input Container Filter Standard $filter
ilUIFilterService $filter_service
Interface Observer Contains several chained tasks and infos about them.
ILIAS HTTP Services $http
const CMD_OPEN_UPDATING_FORM
const CMD_CHANGE_ACTIVATION
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static http()
Fetches the global http state from ILIAS.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
filter(string $filter_id, $class_path, string $cmd, bool $activated=true, bool $expanded=true)
__construct(private IconRepositoryInterface $icon_repo, private object $gui)
getDeletionConfirmationModal(Icon $a_icon)