ILIAS
Release_5_0_x_branch Revision 61816
◀ ilDoc Overview
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Groups
Pages
class.ilLinkButton.php
Go to the documentation of this file.
1
<?php
2
/* Copyright (c) 1998-2012 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4
require_once
"Services/UIComponent/Button/classes/class.ilButton.php"
;
5
13
class
ilLinkButton
extends
ilButton
14
{
15
protected
$url
;
// [string]
16
protected
$target
;
// [string]
17
18
public
static
function
getInstance
()
19
{
20
return
new
self
(
self::TYPE_LINK
);
21
}
22
23
24
//
25
// properties
26
//
27
33
public
function
setUrl
($a_value)
34
{
35
$this->url = trim($a_value);
36
}
37
43
public
function
getUrl
()
44
{
45
return
$this->url
;
46
}
47
53
public
function
setTarget
($a_value)
54
{
55
$this->target = trim($a_value);
56
}
57
63
public
function
getTarget
()
64
{
65
return
$this->target
;
66
}
67
68
69
//
70
// render
71
//
72
78
protected
function
renderCaption
()
79
{
80
return
' '
.$this->getCaption().
' '
;
81
}
82
83
public
function
render
()
84
{
85
$this->
prepareRender
();
86
87
$attr = array();
88
$attr[
"href"
] = $this->
getUrl
() ? $this->
getUrl
() :
"#"
;
89
$attr[
"target"
] = $this->
getTarget
();
90
91
return
'<a'
.$this->renderAttributes($attr).
'>'
.
92
$this->
renderCaption
().
'</a>'
;
93
}
94
}
Services
UIComponent
Button
classes
class.ilLinkButton.php
Generated on Wed Apr 27 2016 21:02:12 for ILIAS by
1.8.1.2 (using
Doxyfile
)