ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilPanelGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Collaboration diagram for ilPanelGUI:

Public Member Functions

 setHeading (string $a_val)
 
 getHeading ()
 
 setBody (string $a_val)
 
 getBody ()
 
 setFooter (string $a_val)
 
 getFooter ()
 
 setPanelStyle (int $a_val)
 
 getPanelStyle ()
 
 setHeadingStyle (int $a_val)
 
 getHeadingStyle ()
 
 setFooterStyle (int $a_val)
 
 getFooterStyle ()
 
 getHTML ()
 

Static Public Member Functions

static getInstance ()
 

Data Fields

const PANEL_STYLE_PRIMARY = 0
 
const PANEL_STYLE_SECONDARY = 1
 
const HEADING_STYLE_SUBHEADING = 0
 
const HEADING_STYLE_BLOCK = 1
 
const FOOTER_STYLE_BLOCK = 0
 

Protected Member Functions

 __construct ()
 

Protected Attributes

string $heading = ""
 
string $body = ""
 
string $footer = ""
 
int $panel_style = 0
 
int $heading_style = 0
 
int $footer_style = 0
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Simple panel class

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de
Deprecated:
10

Definition at line 26 of file class.ilPanelGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilPanelGUI::__construct ( )
protected

Definition at line 41 of file class.ilPanelGUI.php.

42  {
43  }

Member Function Documentation

◆ getBody()

ilPanelGUI::getBody ( )

Definition at line 65 of file class.ilPanelGUI.php.

References $body.

Referenced by getHTML().

65  : string
66  {
67  return $this->body;
68  }
+ Here is the caller graph for this function:

◆ getFooter()

ilPanelGUI::getFooter ( )

Definition at line 75 of file class.ilPanelGUI.php.

References $footer.

Referenced by getHTML().

75  : string
76  {
77  return $this->footer;
78  }
+ Here is the caller graph for this function:

◆ getFooterStyle()

ilPanelGUI::getFooterStyle ( )

Definition at line 105 of file class.ilPanelGUI.php.

References $footer_style.

Referenced by getHTML().

105  : int
106  {
107  return $this->footer_style;
108  }
+ Here is the caller graph for this function:

◆ getHeading()

ilPanelGUI::getHeading ( )

Definition at line 55 of file class.ilPanelGUI.php.

References $heading.

Referenced by getHTML().

55  : string
56  {
57  return $this->heading;
58  }
+ Here is the caller graph for this function:

◆ getHeadingStyle()

ilPanelGUI::getHeadingStyle ( )

Definition at line 95 of file class.ilPanelGUI.php.

References $heading_style.

Referenced by getHTML().

95  : int
96  {
97  return $this->heading_style;
98  }
+ Here is the caller graph for this function:

◆ getHTML()

ilPanelGUI::getHTML ( )

Definition at line 110 of file class.ilPanelGUI.php.

References getBody(), getFooter(), getFooterStyle(), getHeading(), getHeadingStyle(), and getPanelStyle().

110  : string
111  {
112  $tpl = new ilTemplate("tpl.panel.html", true, true, "Services/UIComponent/Panel");
113 
114  $head_outer_div_style = "";
115  if ($this->getHeading() !== "") {
116  $tpl->setCurrentBlock("heading");
117  $tpl->setVariable("HEADING", $this->getHeading());
118 
119  switch ($this->getHeadingStyle()) {
120  case self::HEADING_STYLE_BLOCK:
121  $tpl->setVariable("HEAD_DIV_STYLE", "panel-heading ilBlockHeader");
122  $tpl->setVariable("HEAD_H3_STYLE", "ilBlockHeader");
123  $head_outer_div_style = "il_Block";
124  break;
125 
126  case self::HEADING_STYLE_SUBHEADING:
127  $tpl->setVariable("HEAD_DIV_STYLE", "panel-heading ilHeader");
128  $tpl->setVariable("HEAD_H3_STYLE", "ilHeader");
129  break;
130  }
131 
132  $tpl->parseCurrentBlock();
133  }
134 
135  $tpl->setVariable("BODY", $this->getBody());
136 
137  if ($this->getFooter() !== "") {
138  $tpl->setCurrentBlock("footer");
139  $tpl->setVariable("FOOTER", $this->getFooter());
140 
141  switch ($this->getFooterStyle()) {
142  case self::FOOTER_STYLE_BLOCK:
143  $tpl->setVariable("FOOT_DIV_STYLE", "panel-footer ilBlockInfo");
144  break;
145  }
146 
147  $tpl->parseCurrentBlock();
148  }
149 
150  switch ($this->getPanelStyle()) {
151  case self::PANEL_STYLE_SECONDARY:
152  $tpl->setVariable("PANEL_STYLE", "panel panel-default " . $head_outer_div_style);
153  break;
154 
155  default:
156  $tpl->setVariable("PANEL_STYLE", "panel panel-primary " . $head_outer_div_style);
157  break;
158  }
159 
160  return $tpl->get();
161  }
+ Here is the call graph for this function:

◆ getInstance()

static ilPanelGUI::getInstance ( )
static

Definition at line 45 of file class.ilPanelGUI.php.

Referenced by ilLearningProgressBaseGUI\__getLegendHTML(), ilLPListOfSettingsGUI\handleLPUsageInfo(), ilUsersGalleryGUI\populateTemplate(), and ilPersonalSkillsGUI\setGapAnalysisActualStatusModePerObject().

45  : self
46  {
47  return new ilPanelGUI();
48  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the caller graph for this function:

◆ getPanelStyle()

ilPanelGUI::getPanelStyle ( )

Definition at line 85 of file class.ilPanelGUI.php.

References $panel_style.

Referenced by getHTML().

85  : int
86  {
87  return $this->panel_style;
88  }
+ Here is the caller graph for this function:

◆ setBody()

ilPanelGUI::setBody ( string  $a_val)

Definition at line 60 of file class.ilPanelGUI.php.

60  : void
61  {
62  $this->body = $a_val;
63  }

◆ setFooter()

ilPanelGUI::setFooter ( string  $a_val)

Definition at line 70 of file class.ilPanelGUI.php.

References ILIAS\UI\examples\MainControls\Footer\footer().

70  : void
71  {
72  $this->footer = $a_val;
73  }
+ Here is the call graph for this function:

◆ setFooterStyle()

ilPanelGUI::setFooterStyle ( int  $a_val)

Definition at line 100 of file class.ilPanelGUI.php.

100  : void
101  {
102  $this->footer_style = $a_val;
103  }

◆ setHeading()

ilPanelGUI::setHeading ( string  $a_val)

Definition at line 50 of file class.ilPanelGUI.php.

50  : void
51  {
52  $this->heading = $a_val;
53  }

◆ setHeadingStyle()

ilPanelGUI::setHeadingStyle ( int  $a_val)

Definition at line 90 of file class.ilPanelGUI.php.

90  : void
91  {
92  $this->heading_style = $a_val;
93  }

◆ setPanelStyle()

ilPanelGUI::setPanelStyle ( int  $a_val)

Definition at line 80 of file class.ilPanelGUI.php.

80  : void
81  {
82  $this->panel_style = $a_val;
83  }

Field Documentation

◆ $body

string ilPanelGUI::$body = ""
protected

Definition at line 35 of file class.ilPanelGUI.php.

Referenced by getBody().

◆ $footer

string ilPanelGUI::$footer = ""
protected

Definition at line 36 of file class.ilPanelGUI.php.

Referenced by getFooter().

◆ $footer_style

int ilPanelGUI::$footer_style = 0
protected

Definition at line 39 of file class.ilPanelGUI.php.

Referenced by getFooterStyle().

◆ $heading

string ilPanelGUI::$heading = ""
protected

Definition at line 34 of file class.ilPanelGUI.php.

Referenced by getHeading().

◆ $heading_style

int ilPanelGUI::$heading_style = 0
protected

Definition at line 38 of file class.ilPanelGUI.php.

Referenced by getHeadingStyle().

◆ $panel_style

int ilPanelGUI::$panel_style = 0
protected

Definition at line 37 of file class.ilPanelGUI.php.

Referenced by getPanelStyle().

◆ FOOTER_STYLE_BLOCK

const ilPanelGUI::FOOTER_STYLE_BLOCK = 0

Definition at line 32 of file class.ilPanelGUI.php.

◆ HEADING_STYLE_BLOCK

const ilPanelGUI::HEADING_STYLE_BLOCK = 1

Definition at line 31 of file class.ilPanelGUI.php.

◆ HEADING_STYLE_SUBHEADING

const ilPanelGUI::HEADING_STYLE_SUBHEADING = 0

Definition at line 30 of file class.ilPanelGUI.php.

◆ PANEL_STYLE_PRIMARY

const ilPanelGUI::PANEL_STYLE_PRIMARY = 0

◆ PANEL_STYLE_SECONDARY

const ilPanelGUI::PANEL_STYLE_SECONDARY = 1

The documentation for this class was generated from the following file: