ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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

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

References setId().

23  {
24  $this->setId($a_id);
25  }
setId($a_val)
Set Id.
+ 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.

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

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
+ Here is the call graph for this function:

◆ getHTML()

ilLightboxGUI::getHTML ( )

Get HTML.

Parameters

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

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

Referenced by addLightbox().

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.
global $tpl
Definition: ilias.php:8
special template class to simplify handling of ITX/PEAR
+ 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.

References $id.

Referenced by addLightbox(), and getHTML().

43  {
44  return $this->id;
45  }
+ 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.

Referenced by getHTML().

63  {
64  return $this->width;
65  }
+ 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.

Referenced by __construct().

33  {
34  $this->id = $a_val;
35  }
+ 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: