ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilLightboxGUI Class Reference

Lighbox handling. More...

+ Collaboration diagram for ilLightboxGUI:

Public Member Functions

 __construct ($a_id)
 Constructor. More...
 
 setId ($a_val)
 Set Id. More...
 
 getId ()
 Get Id. More...
 
 setWidth ($a_val)
 Set width. More...
 
 getWidth ()
 Get width. More...
 
 addLightbox ($a_tpl=null)
 Init lightbox. More...
 
 getHTML ()
 Get HTML. More...
 

Static Public Member Functions

static getLocalLightboxJsPath ()
 Get local path of jQuery file. More...
 

Protected Attributes

 $id = ""
 

Detailed Description

Lighbox handling.

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.ilLightboxGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilLightboxGUI::__construct (   $a_id)

Constructor.

Parameters

return

Definition at line 22 of file class.ilLightboxGUI.php.

23 {
24 $this->setId($a_id);
25 }
setId($a_val)
Set Id.

References setId().

+ Here is the call graph for this function:

Member Function Documentation

◆ addLightbox()

ilLightboxGUI::addLightbox (   $a_tpl = null)

Init lightbox.

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

79 {
80 global $tpl;
81
82 if ($a_tpl == null)
83 {
84 $a_tpl = $tpl;
85 }
86
87 $a_tpl->addJavaScript(self::getLocalLightboxJsPath());
88 $a_tpl->addLightbox($this->getHTML(), $this->getId());
89 }
global $tpl
Definition: ilias.php:8

References $tpl, getHTML(), and getId().

+ Here is the call graph for this function:

◆ getHTML()

ilLightboxGUI::getHTML ( )

Get HTML.

Parameters

return

Definition at line 97 of file class.ilLightboxGUI.php.

98 {
99 $tpl = new ilTemplate("tpl.lightbox.html", true, true, "Services/UIComponent/Lightbox");
100 $tpl->setVariable("LIGHTBOX_CONTENT", "");
101 $tpl->setVariable("ID", $this->getId());
102 if ($this->getWidth() != "")
103 {
104 $tpl->setVariable("WIDTH", "width: ".$this->getWidth().";");
105 }
106 return $tpl->get();
107 }
getWidth()
Get width.
special template class to simplify handling of ITX/PEAR

References $tpl, getId(), and getWidth().

Referenced by addLightbox().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getId()

ilLightboxGUI::getId ( )

Get Id.

Returns
string id

Definition at line 42 of file class.ilLightboxGUI.php.

43 {
44 return $this->id;
45 }

References $id.

Referenced by addLightbox(), and getHTML().

+ Here is the caller graph for this function:

◆ getLocalLightboxJsPath()

static ilLightboxGUI::getLocalLightboxJsPath ( )
static

Get local path of jQuery file.

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

71 {
72 return "./Services/UIComponent/Lightbox/js/Lightbox.js";
73 }

◆ getWidth()

ilLightboxGUI::getWidth ( )

Get width.

Returns
string width

Definition at line 62 of file class.ilLightboxGUI.php.

63 {
64 return $this->width;
65 }

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ setId()

ilLightboxGUI::setId (   $a_val)

Set Id.

Parameters
string$a_valid

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

33 {
34 $this->id = $a_val;
35 }

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setWidth()

ilLightboxGUI::setWidth (   $a_val)

Set width.

Parameters
string$a_valwidth

Definition at line 52 of file class.ilLightboxGUI.php.

53 {
54 $this->width = $a_val;
55 }

Field Documentation

◆ $id

ilLightboxGUI::$id = ""
protected

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

Referenced by getId().


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