ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
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

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

Constructor & Destructor Documentation

◆ __construct()

ilPanelGUI::__construct ( )
protected

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

40  {
41  }

Member Function Documentation

◆ getBody()

ilPanelGUI::getBody ( )

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

References $body.

Referenced by getHTML().

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

◆ getFooter()

ilPanelGUI::getFooter ( )

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

References $footer.

Referenced by getHTML().

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

◆ getFooterStyle()

ilPanelGUI::getFooterStyle ( )

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

References $footer_style.

Referenced by getHTML().

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

◆ getHeading()

ilPanelGUI::getHeading ( )

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

References $heading.

Referenced by getHTML().

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

◆ getHeadingStyle()

ilPanelGUI::getHeadingStyle ( )

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

References $heading_style.

Referenced by getHTML().

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

◆ getHTML()

ilPanelGUI::getHTML ( )

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

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

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

◆ getInstance()

◆ getPanelStyle()

ilPanelGUI::getPanelStyle ( )

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

References $panel_style.

Referenced by getHTML().

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

◆ setBody()

ilPanelGUI::setBody ( string  $a_val)

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

58  : void
59  {
60  $this->body = $a_val;
61  }

◆ setFooter()

ilPanelGUI::setFooter ( string  $a_val)

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

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

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

◆ setFooterStyle()

ilPanelGUI::setFooterStyle ( int  $a_val)

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

98  : void
99  {
100  $this->footer_style = $a_val;
101  }

◆ setHeading()

ilPanelGUI::setHeading ( string  $a_val)

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

48  : void
49  {
50  $this->heading = $a_val;
51  }

◆ setHeadingStyle()

ilPanelGUI::setHeadingStyle ( int  $a_val)

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

88  : void
89  {
90  $this->heading_style = $a_val;
91  }

◆ setPanelStyle()

ilPanelGUI::setPanelStyle ( int  $a_val)

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

78  : void
79  {
80  $this->panel_style = $a_val;
81  }

Field Documentation

◆ $body

string ilPanelGUI::$body = ""
protected

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

Referenced by getBody().

◆ $footer

string ilPanelGUI::$footer = ""
protected

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

Referenced by getFooter().

◆ $footer_style

int ilPanelGUI::$footer_style = 0
protected

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

Referenced by getFooterStyle().

◆ $heading

string ilPanelGUI::$heading = ""
protected

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

Referenced by getHeading().

◆ $heading_style

int ilPanelGUI::$heading_style = 0
protected

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

Referenced by getHeadingStyle().

◆ $panel_style

int ilPanelGUI::$panel_style = 0
protected

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

Referenced by getPanelStyle().

◆ FOOTER_STYLE_BLOCK

const ilPanelGUI::FOOTER_STYLE_BLOCK = 0

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

◆ HEADING_STYLE_BLOCK

const ilPanelGUI::HEADING_STYLE_BLOCK = 1

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

Referenced by ilChatroomViewGUI\showRoom().

◆ HEADING_STYLE_SUBHEADING

const ilPanelGUI::HEADING_STYLE_SUBHEADING = 0

◆ PANEL_STYLE_PRIMARY

const ilPanelGUI::PANEL_STYLE_PRIMARY = 0

◆ PANEL_STYLE_SECONDARY


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