ILIAS  release_8 Revision v8.24
class.ilSystemStyleDeleteGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22{
23 protected ilLanguage $lng;
24 protected ilCtrl $ctrl;
25 protected array $styles = [];
27
29 {
30 global $DIC;
31 $this->main_tpl = $DIC->ui()->mainTemplate();
32 $this->lng = $lng;
33 $this->ctrl = $ctrl;
34 }
35
36 public function addStyle(ilSkin $skin, ilSkinStyle $style, string $img_path): void
37 {
38 $this->styles[] = [
39 'var' => 'style_' . sizeof($this->styles),
40 'id' => $skin->getId() . ':' . $style->getId(),
41 'text' => $skin->getName() . ' / ' . $style->getName(),
42 'img' => $img_path,
43 'alt' => ''
44 ];
45 }
46
47 public function getDeleteStyleFormHTML(): string
48 {
49 $this->main_tpl->setOnScreenMessage('question', $this->lng->txt('info_delete_sure'), true);
50
51 $table_form = new ilConfirmationTableGUI(true);
52 $table_form->setFormName('delete_style');
53
54 $table_form->addCommandButton('confirmDelete', $this->lng->txt('confirm'));
55 $table_form->addCommandButton('cancel', $this->lng->txt('cancel'));
56 $table_form->setFormAction($this->ctrl->getFormActionByClass('ilSystemStyleOverviewGUI'));
57 $table_form->setData($this->styles);
58 return $table_form->getHTML();
59 }
60}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilCtrl provides processing control methods.
language handling
ilSkin holds an manages the basic data of a skin as provide by the template of the skin.
ilGlobalTemplateInterface $main_tpl
addStyle(ilSkin $skin, ilSkinStyle $style, string $img_path)
__construct(ilLanguage $lng, ilCtrl $ctrl)
global $DIC
Definition: feed.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...