ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
ilModalGUI Class Reference

Modal class. More...

+ Collaboration diagram for ilModalGUI:

Public Member Functions

 setId ($a_val)
 Set id. More...
 
 getId ()
 Get id. More...
 
 setHeading ($a_val)
 Set heading. More...
 
 getHeading ()
 Get heading. More...
 
 setBody ($a_val)
 Set body. More...
 
 getBody ()
 Get body. More...
 
 setType ($a_val)
 Set type. More...
 
 getType ()
 Get type. More...
 
 getHTML ()
 Get HTML. More...
 

Static Public Member Functions

static getInstance ()
 Get instance. More...
 

Data Fields

const TYPE_LARGE = "large"
 
const TYPE_MEDIUM = "medium"
 
const TYPE_SMALL = "small"
 

Protected Member Functions

 __construct ()
 Constructor. More...
 

Protected Attributes

 $heading = ""
 
 $body = ""
 
 $id = ""
 
 $type = self::TYPE_MEDIUM
 

Detailed Description

Modal class.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 12 of file class.ilModalGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilModalGUI::__construct ( )
protected

Constructor.

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

27 {
28
29 }

Member Function Documentation

◆ getBody()

ilModalGUI::getBody ( )

Get body.

Returns
string body

Definition at line 96 of file class.ilModalGUI.php.

97 {
98 return $this->body;
99 }

References $body.

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getHeading()

ilModalGUI::getHeading ( )

Get heading.

Returns
string heading

Definition at line 76 of file class.ilModalGUI.php.

77 {
78 return $this->heading;
79 }

References $heading.

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getHTML()

ilModalGUI::getHTML ( )

Get HTML.

Returns
string html

Definition at line 126 of file class.ilModalGUI.php.

127 {
128 $tpl = new ilTemplate("tpl.modal.html", true, true, "Services/UIComponent/Modal");
129
130 $tpl->setVariable("HEADING", $this->getHeading());
131
132 $tpl->setVariable("MOD_ID", $this->getId());
133 $tpl->setVariable("BODY", $this->getBody());
134
135 switch ($this->getType())
136 {
137 case self::TYPE_LARGE:
138 $tpl->setVariable("CLASS", "modal-lg");
139 break;
140
141 case self::TYPE_SMALL:
142 $tpl->setVariable("CLASS", "modal-sm");
143 break;
144 }
145
146 return $tpl->get();
147 }
global $tpl
Definition: ilias.php:8
getBody()
Get body.
getHeading()
Get heading.
getId()
Get id.
getType()
Get type.
special template class to simplify handling of ITX/PEAR

References $tpl, getBody(), getHeading(), getId(), getType(), TYPE_LARGE, and TYPE_SMALL.

+ Here is the call graph for this function:

◆ getId()

ilModalGUI::getId ( )

Get id.

Returns
string id

Definition at line 56 of file class.ilModalGUI.php.

57 {
58 return $this->id;
59 }

References $id.

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getInstance()

static ilModalGUI::getInstance ( )
static

Get instance.

Returns
ilModalGUI panel instance

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

37 {
38 return new ilModalGUI();
39 }
Modal class.

Referenced by ilInternalLinkGUI\getInitHTML(), ilObjMediaPoolGUI\getPreviewModalHTML(), ilClozeGapInputBuilderGUI\insert(), ilTermsOfServiceAcceptanceHistoryTableGUI\prepareRow(), and ilTermsOfServiceAgreementByLanguageTableGUI\prepareRow().

+ Here is the caller graph for this function:

◆ getType()

ilModalGUI::getType ( )

Get type.

Returns
string type

Definition at line 116 of file class.ilModalGUI.php.

117 {
118 return $this->type;
119 }

References $type.

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ setBody()

ilModalGUI::setBody (   $a_val)

Set body.

Parameters
string$a_valbody

Definition at line 86 of file class.ilModalGUI.php.

87 {
88 $this->body = $a_val;
89 }

◆ setHeading()

ilModalGUI::setHeading (   $a_val)

Set heading.

Parameters
string$a_valheading

Definition at line 66 of file class.ilModalGUI.php.

67 {
68 $this->heading = $a_val;
69 }

◆ setId()

ilModalGUI::setId (   $a_val)

Set id.

Parameters
string$a_valid

Definition at line 46 of file class.ilModalGUI.php.

47 {
48 $this->id = $a_val;
49 }

◆ setType()

ilModalGUI::setType (   $a_val)

Set type.

Parameters
string$a_valtype const ilModalGUI::TYPE_SMALL|ilModalGUI::TYPE_MEDIUM|ilModalGUI::TYPE_LARGE

Definition at line 106 of file class.ilModalGUI.php.

107 {
108 $this->type = $a_val;
109 }

Field Documentation

◆ $body

ilModalGUI::$body = ""
protected

Definition at line 15 of file class.ilModalGUI.php.

Referenced by getBody().

◆ $heading

ilModalGUI::$heading = ""
protected

Definition at line 14 of file class.ilModalGUI.php.

Referenced by getHeading().

◆ $id

ilModalGUI::$id = ""
protected

Definition at line 16 of file class.ilModalGUI.php.

Referenced by getId().

◆ $type

ilModalGUI::$type = self::TYPE_MEDIUM
protected

Definition at line 21 of file class.ilModalGUI.php.

Referenced by getType().

◆ TYPE_LARGE

const ilModalGUI::TYPE_LARGE = "large"

Definition at line 17 of file class.ilModalGUI.php.

Referenced by getHTML(), and ilObjMediaPoolGUI\getPreviewModalHTML().

◆ TYPE_MEDIUM

const ilModalGUI::TYPE_MEDIUM = "medium"

Definition at line 18 of file class.ilModalGUI.php.

◆ TYPE_SMALL

const ilModalGUI::TYPE_SMALL = "small"

Definition at line 19 of file class.ilModalGUI.php.

Referenced by getHTML().


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