ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
◀ ilDoc Overview
class.ilTestPlayerNavButton.php
Go to the documentation of this file.
1
<?
php
2
/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4
require_once
'Services/UIComponent/Button/classes/class.ilLinkButton.php'
;
5
12
class
ilTestPlayerNavButton
extends
ilLinkButton
13
{
17
private
$nextCommand
=
''
;
18
19
// fau: testNav - add glyphicon support for navigation buttons
20
private
$leftGlyph
=
''
;
21
private
$rightGlyph
=
''
;
22
23
public
function
setLeftGlyph
($glyph)
24
{
25
$this->leftGlyph = $glyph;
26
}
27
28
public
function
setRightGlyph
($glyph)
29
{
30
$this->rightGlyph = $glyph;
31
}
32
33
protected
function
renderCaption
()
34
{
35
$caption
=
''
;
36
37
if
($this->leftGlyph)
38
{
39
$caption
.=
'<span class="'
.$this->leftGlyph.
'"></span> '
;
40
}
41
42
$caption
.= parent::renderCaption();
43
44
if
($this->rightGlyph)
45
{
46
$caption
.=
' <span class="'
.$this->rightGlyph.
'"></span>'
;
47
}
48
49
return
$caption
;
50
}
51
// fau.
52
56
public
function
getNextCommand
()
57
{
58
return
$this->nextCommand
;
59
}
60
64
public
function
setNextCommand
(
$nextCommand
)
65
{
66
$this->nextCommand =
$nextCommand
;
67
}
68
72
public
function
render
()
73
{
74
$this->
prepareRender
();
75
76
$attr =
array
(
77
'href'
=> $this->
getUrl
() ? $this->
getUrl
() :
"#"
,
78
'target'
=> $this->
getTarget
()
79
);
80
81
if
( strlen($this->
getNextCommand
()) )
82
{
83
$attr[
'data-nextcmd'
] = $this->
getNextCommand
();
84
}
85
86
return
'<a'
.$this->renderAttributes($attr).
'>'
.$this->
renderCaption
().
'</a>'
;
87
}
88
89
public
static
function
getInstance
()
90
{
91
return
new
self
(self::TYPE_LINK);
92
}
93
}
ilTestPlayerNavButton\$nextCommand
$nextCommand
Definition:
class.ilTestPlayerNavButton.php:17
ilTestPlayerNavButton\getNextCommand
getNextCommand()
Definition:
class.ilTestPlayerNavButton.php:56
ilTestPlayerNavButton\renderCaption
renderCaption()
Definition:
class.ilTestPlayerNavButton.php:33
ilTestPlayerNavButton\render
render()
Definition:
class.ilTestPlayerNavButton.php:72
ilTestPlayerNavButton\setRightGlyph
setRightGlyph($glyph)
Definition:
class.ilTestPlayerNavButton.php:28
ilLinkButton\getUrl
getUrl()
Get URL.
Definition:
class.ilLinkButton.php:43
ilTestPlayerNavButton\getInstance
static getInstance()
Definition:
class.ilTestPlayerNavButton.php:89
ilTestPlayerNavButton\$rightGlyph
$rightGlyph
Definition:
class.ilTestPlayerNavButton.php:21
ilTestPlayerNavButton\setNextCommand
setNextCommand($nextCommand)
Definition:
class.ilTestPlayerNavButton.php:64
ilButtonBase\prepareRender
prepareRender()
Prepare render.
Definition:
class.ilButtonBase.php:344
ilButtonBase\$caption
$caption
Definition:
class.ilButtonBase.php:17
ilTestPlayerNavButton\setLeftGlyph
setLeftGlyph($glyph)
Definition:
class.ilTestPlayerNavButton.php:23
array
Create styles array
The data for the language used.
Definition:
40duplicateStyle.php:19
ilTestPlayerNavButton\$leftGlyph
$leftGlyph
Definition:
class.ilTestPlayerNavButton.php:20
ilTestPlayerNavButton
Definition:
class.ilTestPlayerNavButton.php:12
ilLinkButton\getTarget
getTarget()
Get target.
Definition:
class.ilLinkButton.php:63
php
ilLinkButton
Definition:
class.ilLinkButton.php:13
Modules
Test
classes
class.ilTestPlayerNavButton.php
Generated on Fri Jan 17 2025 19:01:03 for ILIAS by
1.8.13 (using
Doxyfile
)