From ca2e5567b18bea1bbea9f26c9527205607330b39 Mon Sep 17 00:00:00 2001 From: mjansen Date: Tue, 15 Oct 2024 07:49:00 +0200 Subject: [PATCH] Legacy UI: Remove `Panel` from code base --- .../Panel/classes/class.ilPanelGUI.php | 162 ------------------ .../Panel/templates/default/tpl.panel.html | 7 - 2 files changed, 169 deletions(-) delete mode 100755 components/ILIAS/UIComponent/Panel/classes/class.ilPanelGUI.php delete mode 100755 components/ILIAS/UIComponent/Panel/templates/default/tpl.panel.html diff --git a/components/ILIAS/UIComponent/Panel/classes/class.ilPanelGUI.php b/components/ILIAS/UIComponent/Panel/classes/class.ilPanelGUI.php deleted file mode 100755 index c11d105fbef8..000000000000 --- a/components/ILIAS/UIComponent/Panel/classes/class.ilPanelGUI.php +++ /dev/null @@ -1,162 +0,0 @@ - - * - * @deprecated 10 - */ -class ilPanelGUI -{ - public const PANEL_STYLE_PRIMARY = 0; - public const PANEL_STYLE_SECONDARY = 1; - public const HEADING_STYLE_SUBHEADING = 0; - public const HEADING_STYLE_BLOCK = 1; - public const FOOTER_STYLE_BLOCK = 0; - - protected string $heading = ""; - protected string $body = ""; - protected string $footer = ""; - protected int $panel_style = 0; - protected int $heading_style = 0; - protected int $footer_style = 0; - - protected function __construct() - { - } - - public static function getInstance(): self - { - return new ilPanelGUI(); - } - - public function setHeading(string $a_val): void - { - $this->heading = $a_val; - } - - public function getHeading(): string - { - return $this->heading; - } - - public function setBody(string $a_val): void - { - $this->body = $a_val; - } - - public function getBody(): string - { - return $this->body; - } - - public function setFooter(string $a_val): void - { - $this->footer = $a_val; - } - - public function getFooter(): string - { - return $this->footer; - } - - public function setPanelStyle(int $a_val): void - { - $this->panel_style = $a_val; - } - - public function getPanelStyle(): int - { - return $this->panel_style; - } - - public function setHeadingStyle(int $a_val): void - { - $this->heading_style = $a_val; - } - - public function getHeadingStyle(): int - { - return $this->heading_style; - } - - public function setFooterStyle(int $a_val): void - { - $this->footer_style = $a_val; - } - - public function getFooterStyle(): int - { - return $this->footer_style; - } - - public function getHTML(): string - { - $tpl = new ilTemplate("tpl.panel.html", true, true, "components/ILIAS/UIComponent/Panel"); - - $head_outer_div_style = ""; - if ($this->getHeading() !== "") { - $tpl->setCurrentBlock("heading"); - $tpl->setVariable("HEADING", $this->getHeading()); - - switch ($this->getHeadingStyle()) { - case self::HEADING_STYLE_BLOCK: - $tpl->setVariable("HEAD_DIV_STYLE", "panel-heading ilBlockHeader"); - $tpl->setVariable("HEAD_H3_STYLE", "ilBlockHeader"); - $head_outer_div_style = "il_Block"; - break; - - case self::HEADING_STYLE_SUBHEADING: - $tpl->setVariable("HEAD_DIV_STYLE", "panel-heading ilHeader"); - $tpl->setVariable("HEAD_H3_STYLE", "ilHeader"); - break; - } - - $tpl->parseCurrentBlock(); - } - - $tpl->setVariable("BODY", $this->getBody()); - - if ($this->getFooter() !== "") { - $tpl->setCurrentBlock("footer"); - $tpl->setVariable("FOOTER", $this->getFooter()); - - switch ($this->getFooterStyle()) { - case self::FOOTER_STYLE_BLOCK: - $tpl->setVariable("FOOT_DIV_STYLE", "panel-footer ilBlockInfo"); - break; - } - - $tpl->parseCurrentBlock(); - } - - switch ($this->getPanelStyle()) { - case self::PANEL_STYLE_SECONDARY: - $tpl->setVariable("PANEL_STYLE", "panel panel-default " . $head_outer_div_style); - break; - - default: - $tpl->setVariable("PANEL_STYLE", "panel panel-primary " . $head_outer_div_style); - break; - } - - return $tpl->get(); - } -} diff --git a/components/ILIAS/UIComponent/Panel/templates/default/tpl.panel.html b/components/ILIAS/UIComponent/Panel/templates/default/tpl.panel.html deleted file mode 100755 index 364487a157e4..000000000000 --- a/components/ILIAS/UIComponent/Panel/templates/default/tpl.panel.html +++ /dev/null @@ -1,7 +0,0 @@ -
-

{HEADING}

-
- {BODY} -
-
{FOOTER}
-
\ No newline at end of file