ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilSystemStyleDeleteGUI.php
Go to the documentation of this file.
1<?php
2include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
3include_once("Services/Utilities/classes/class.ilConfirmationTableGUI.php");
4
5
11{
12
16 protected $lng;
17
21 protected $ctrl;
22
26 protected $styles = array();
27
31 public function __construct()
32 {
33 global $DIC;
34
35 $this->lng = $DIC->language();
36 $this->ctrl = $DIC->ctrl();
37 }
38
43 public function addStyle(ilSkinXML $skin, ilSkinStyleXML $style)
44 {
45 $this->styles[] = array(
46 "var" => "style_" . $skin->getId() . ":" . $style->getId(),
47 "id" => $skin->getId() . ":" . $style->getId(),
48 "text" => $skin->getName() . " / " . $style->getName(),
49 "img" => ilUtil::getImagePath('icon_stys.svg')
50 );
51 }
52
56 public function getDeleteStyleFormHTML()
57 {
58 ilUtil::sendQuestion($this->lng->txt("info_delete_sure"), true);
59
60 $table_form = new ilConfirmationTableGUI(true);
61 $table_form->setFormName("delete_style");
62
63 $table_form->addCommandButton('confirmDelete', $this->lng->txt('confirm'));
64 $table_form->addCommandButton('cancel', $this->lng->txt('cancel'));
65 $table_form->setFormAction($this->ctrl->getFormActionByClass("ilSystemStyleOverviewGUI"));
66 $table_form->setData($this->getStyles());
67 return $table_form->getHTML();
68 }
69
73 public function getStyles()
74 {
75 return $this->styles;
76 }
77
81 public function setStyles($styles)
82 {
83 $this->styles = $styles;
84 }
85}
An exception for terminatinating execution or to throw for unit testing.
ilSkinXml holds an manages the basic data of a skin as provide by the template of the skin.
addStyle(ilSkinXML $skin, ilSkinStyleXML $style)
static sendQuestion($a_info="", $a_keep=false)
Send Question to Screen.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
$style
Definition: example_012.php:70
global $DIC
Definition: saml.php:7