ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
class.ilLightboxGUI.php
Go to the documentation of this file.
1
<?
php
2
3
/* Copyright (c) 1998-2011 ILIAS open source, Extended GPL, see docs/LICENSE */
4
12
class
ilLightboxGUI
13
{
17
protected
$tpl
;
18
19
protected
$id
=
""
;
20
27
public
function
__construct
($a_id)
28
{
29
global
$DIC
;
30
31
$this->tpl = $DIC[
"tpl"
];
32
$this->
setId
($a_id);
33
}
34
40
public
function
setId
($a_val)
41
{
42
$this->
id
= $a_val;
43
}
44
50
public
function
getId
()
51
{
52
return
$this->id
;
53
}
54
60
public
function
setWidth
($a_val)
61
{
62
$this->width = $a_val;
63
}
64
70
public
function
getWidth
()
71
{
72
return
$this->width;
73
}
74
78
public
static
function
getLocalLightboxJsPath
()
79
{
80
return
"./Services/UIComponent/Lightbox/js/Lightbox.js"
;
81
}
82
86
public
function
addLightbox
($a_tpl = null)
87
{
88
$tpl
=
$this->tpl
;
89
90
if
($a_tpl == null) {
91
$a_tpl =
$tpl
;
92
}
93
94
$a_tpl->addJavaScript(self::getLocalLightboxJsPath());
95
$a_tpl->addLightbox($this->
getHTML
(), $this->
getId
());
96
}
97
104
public
function
getHTML
()
105
{
106
$tpl
=
new
ilTemplate
(
"tpl.lightbox.html"
,
true
,
true
,
"Services/UIComponent/Lightbox"
);
107
$tpl
->setVariable(
"LIGHTBOX_CONTENT"
,
""
);
108
$tpl
->setVariable(
"ID"
, $this->
getId
());
109
if
($this->
getWidth
() !=
""
) {
110
$tpl
->setVariable(
"WIDTH"
,
"width: "
. $this->
getWidth
() .
";"
);
111
}
112
return
$tpl
->get();
113
}
114
}
ilLightboxGUI\getWidth
getWidth()
Get width.
Definition:
class.ilLightboxGUI.php:70
$DIC
global $DIC
Definition:
saml.php:7
ilLightboxGUI\getHTML
getHTML()
Get HTML.
Definition:
class.ilLightboxGUI.php:104
ilLightboxGUI
Lighbox handling.
Definition:
class.ilLightboxGUI.php:12
ilLightboxGUI\setWidth
setWidth($a_val)
Set width.
Definition:
class.ilLightboxGUI.php:60
ilLightboxGUI\setId
setId($a_val)
Set Id.
Definition:
class.ilLightboxGUI.php:40
ilLightboxGUI\getLocalLightboxJsPath
static getLocalLightboxJsPath()
Get local path of jQuery file.
Definition:
class.ilLightboxGUI.php:78
ilLightboxGUI\$tpl
$tpl
Definition:
class.ilLightboxGUI.php:17
ilTemplate
special template class to simplify handling of ITX/PEAR
Definition:
class.ilTemplate.php:13
ilLightboxGUI\getId
getId()
Get Id.
Definition:
class.ilLightboxGUI.php:50
ilLightboxGUI\__construct
__construct($a_id)
Constructor.
Definition:
class.ilLightboxGUI.php:27
php
ilLightboxGUI\$id
$id
Definition:
class.ilLightboxGUI.php:19
ilLightboxGUI\addLightbox
addLightbox($a_tpl=null)
Init lightbox.
Definition:
class.ilLightboxGUI.php:86
Services
UIComponent
Lightbox
classes
class.ilLightboxGUI.php
Generated on Thu Jan 16 2025 19:02:32 for ILIAS by
1.8.13 (using
Doxyfile
)