ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
◀ ilDoc Overview
Button.php
Go to the documentation of this file.
1
<?
php
2
3
/* Copyright (c) 2016 Richard Klees <richard.klees@concepts-and-training.de> Extended GPL, see docs/LICENSE */
4
5
namespace
ILIAS\UI\Implementation\Component\Button
;
6
7
use
ILIAS\UI\Component
as
C
;
8
use
ILIAS\UI\Implementation\Component\ComponentHelper
;
9
use
ILIAS\UI\Component\Glyph\Glyph
;
10
use
ILIAS\UI\Implementation\Component\JavaScriptBindable
;
11
15
abstract
class
Button
implements
C\Button\Button {
16
use
ComponentHelper
;
17
use
JavaScriptBindable
;
18
22
protected
$label
;
23
27
protected
$action
;
28
32
protected
$active
=
true
;
33
34
public
function
__construct
(
$label
,
$action
) {
35
$this->checkStringArg(
"label"
,
$label
);
36
$this->checkStringArg(
"action"
,
$action
);
37
$this->label =
$label
;
38
$this->action =
$action
;
39
}
40
44
public
function
getLabel
() {
45
return
$this->label
;
46
}
47
51
public
function
withLabel
(
$label
) {
52
$this->checkStringArg(
"label"
,
$label
);
53
$clone = clone $this;
54
$clone->label =
$label
;
55
return
$clone;
56
}
57
61
public
function
getAction
() {
62
return
$this->action
;
63
}
64
68
public
function
isActive
() {
69
return
$this->active
;
70
}
71
75
public
function
withUnavailableAction
() {
76
$clone = clone $this;
77
$clone->active =
false
;
78
return
$clone;
79
}
80
}
ILIAS\UI\Component
ILIAS\UI\Implementation\Component\JavaScriptBindable
trait JavaScriptBindable
Trait for components implementing JavaScriptBindable providing standard implementation.
Definition:
JavaScriptBindable.php:11
ILIAS\UI\Implementation\Component\Button\Button\$active
$active
Definition:
Button.php:32
ILIAS\UI\Implementation\Component\Button\Button\$action
$action
Definition:
Button.php:27
ILIAS\UI\Implementation\Component\Button
Definition:
Button.php:5
ILIAS\UI\Implementation\Component\Button\Button\withUnavailableAction
withUnavailableAction()
Definition:
Button.php:75
ILIAS\UI\Implementation\Component\Button\Button\getLabel
getLabel()
Definition:
Button.php:44
Glyph
ILIAS\UI\Implementation\Component\Button\Button\__construct
__construct($label, $action)
Definition:
Button.php:34
ILIAS\UI\Implementation\Component\Button\Button\$label
$label
Definition:
Button.php:22
ComponentHelper
ILIAS\UI\Implementation\Component\Button\Button
This implements commonalities between standard and primary buttons.
Definition:
Button.php:15
ILIAS\UI\Implementation\Component\Button\Button\withLabel
withLabel($label)
Definition:
Button.php:51
ILIAS\UI\Implementation\Component\Button\Button\getAction
getAction()
Definition:
Button.php:61
php
ILIAS\UI\Implementation\Component\Button\Button\isActive
isActive()
Definition:
Button.php:68
ComponentHelper
src
UI
Implementation
Component
Button
Button.php
Generated on Fri Jan 24 2025 19:01:18 for ILIAS by
1.8.13 (using
Doxyfile
)