ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ ilDoc Overview
Mode.php
Go to the documentation of this file.
1
<?php
2
3
/* Copyright (c) 2016 Jesús López <lopez@leifos.de> Extended GPL, see docs/LICENSE */
4
5
namespace
ILIAS\UI\Implementation\Component\ViewControl
;
6
7
use
ILIAS\UI\Component
as
C
;
8
use
ILIAS\UI\Implementation\Component\ComponentHelper
;
9
10
class
Mode
implements
C\ViewControl\Mode
11
{
12
use
ComponentHelper
;
13
17
protected
$labeled_actions
;
18
22
protected
$aria_label
;
23
27
protected
$active
;
28
29
public
function
__construct
($labelled_actions,
$aria_label
)
30
{
31
$this->labeled_actions = $this->
toArray
($labelled_actions);
32
$this->
checkStringArg
(
"string"
,
$aria_label
);
33
$this->aria_label =
$aria_label
;
34
}
35
36
public
function
withActive
($label)
37
{
38
$this->
checkStringArg
(
"label"
, $label);
39
$clone = clone $this;
40
$clone->active = $label;
41
return
$clone;
42
}
43
44
public
function
getActive
()
45
{
46
return
$this->active
;
47
}
48
49
public
function
getLabelledActions
()
50
{
51
return
$this->labeled_actions
;
52
}
53
54
public
function
getAriaLabel
()
55
{
56
return
$this->aria_label
;
57
}
58
}
ILIAS\UI\Implementation\Component\ViewControl\Mode\$labeled_actions
$labeled_actions
Definition:
Mode.php:17
ILIAS\UI\Implementation\Component\ViewControl
Definition:
Factory.php:5
ILIAS\UI\Implementation\Component\ViewControl\Mode\$aria_label
$aria_label
Definition:
Mode.php:22
ILIAS\UI\Implementation\Component\ViewControl\Mode\$active
$active
Definition:
Mode.php:27
ILIAS\UI\Component
ILIAS\UI\Implementation\Component\ComponentHelper
trait ComponentHelper
Provides common functionality for component implementations.
Definition:
ComponentHelper.php:11
ILIAS\UI\Implementation\Component\checkStringArg
checkStringArg($which, $value)
Throw an InvalidArgumentException if $value is no string.
Definition:
ComponentHelper.php:90
ILIAS\UI\Implementation\Component\ViewControl\Mode\withActive
withActive($label)
Definition:
Mode.php:36
ILIAS\UI\Implementation\Component\ViewControl\Mode\getLabelledActions
getLabelledActions()
Definition:
Mode.php:49
ILIAS\UI\Implementation\Component\ViewControl\Mode\getActive
getActive()
Definition:
Mode.php:44
ILIAS\UI\Implementation\Component\ViewControl\Mode\__construct
__construct($labelled_actions, $aria_label)
Definition:
Mode.php:29
ILIAS\UI\Implementation\Component\ViewControl\Mode\getAriaLabel
getAriaLabel()
Definition:
Mode.php:54
ILIAS\UI\Implementation\Component\toArray
toArray($value)
Wrap the given value in an array if it is no array.
Definition:
ComponentHelper.php:211
ILIAS\UI\Implementation\Component\ViewControl\Mode
Definition:
Mode.php:10
src
UI
Implementation
Component
ViewControl
Mode.php
Generated on Sat Jan 18 2025 19:01:43 for ILIAS by
1.8.13 (using
Doxyfile
)