ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ 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
$caption
.=
'<span class="'
. $this->leftGlyph .
'"></span> '
;
39
}
40
41
$caption
.= parent::renderCaption();
42
43
if
($this->rightGlyph) {
44
$caption
.=
' <span class="'
. $this->rightGlyph .
'"></span>'
;
45
}
46
47
return
$caption
;
48
}
49
// fau.
50
54
public
function
getNextCommand
()
55
{
56
return
$this->nextCommand
;
57
}
58
62
public
function
setNextCommand
(
$nextCommand
)
63
{
64
$this->nextCommand =
$nextCommand
;
65
}
66
70
public
function
render
()
71
{
72
$this->
prepareRender
();
73
74
$attr =
array
(
75
'href'
=> $this->
getUrl
() ? $this->
getUrl
() :
"#"
,
76
'target'
=> $this->
getTarget
()
77
);
78
79
if
(strlen($this->
getNextCommand
())) {
80
$attr[
'data-nextcmd'
] = $this->
getNextCommand
();
81
}
82
83
return
'<a'
. $this->
renderAttributes
($attr) .
'>'
. $this->
renderCaption
() .
'</a>'
;
84
}
85
86
public
static
function
getInstance
()
87
{
88
return
new
self
(self::TYPE_LINK);
89
}
90
}
ilTestPlayerNavButton\$nextCommand
$nextCommand
Definition:
class.ilTestPlayerNavButton.php:17
ilLinkButton\renderAttributes
renderAttributes(array $a_additional_attr=null)
Definition:
class.ilLinkButton.php:86
ilTestPlayerNavButton\getNextCommand
getNextCommand()
Definition:
class.ilTestPlayerNavButton.php:54
ilTestPlayerNavButton\renderCaption
renderCaption()
Definition:
class.ilTestPlayerNavButton.php:33
ilTestPlayerNavButton\render
render()
Definition:
class.ilTestPlayerNavButton.php:70
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:86
ilTestPlayerNavButton\$rightGlyph
$rightGlyph
Definition:
class.ilTestPlayerNavButton.php:21
ilTestPlayerNavButton\setNextCommand
setNextCommand($nextCommand)
Definition:
class.ilTestPlayerNavButton.php:62
ilButtonBase\prepareRender
prepareRender()
Prepare render.
Definition:
class.ilButtonBase.php:343
ilButtonBase\$caption
$caption
Definition:
class.ilButtonBase.php:22
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
ilLinkButton
Definition:
class.ilLinkButton.php:13
Modules
Test
classes
class.ilTestPlayerNavButton.php
Generated on Sat Jan 18 2025 19:01:22 for ILIAS by
1.8.13 (using
Doxyfile
)