ILIAS
trunk Revision v11.0_alpha-2638-g80c1d007f79
◀ ilDoc Overview
hasActionTrait.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\GlobalScreen\Scope\Footer\Factory
;
22
23
use
ILIAS\Data\URI
;
24
use
ILIAS\UI\Component\Signal
;
25
29
trait
hasActionTrait
30
{
31
protected
URI
|
Signal
|
string
$action;
32
33
protected
bool
$open_in_new_viewport
=
false
;
34
35
public
function
withAction
(
URI
|
Signal
|
string
$action): self
36
{
37
$clone = clone $this;
38
$clone->action = $action;
39
return
$clone;
40
}
41
42
public
function
getAction
():
URI
|
Signal
|string
43
{
44
return
$this->action;
45
}
46
47
public
function
withOpenInNewViewport
(
bool
$state)
48
{
49
$clone = clone $this;
50
$clone->open_in_new_viewport = $state;
51
return
$clone;
52
}
53
54
public
function
mustOpenInNewViewport
(): bool
55
{
56
if
($this->action instanceof
Signal
) {
57
return
false
;
58
}
59
return
$this->open_in_new_viewport
;
60
}
61
}
ILIAS\GlobalScreen\Scope\Footer\Factory\mustOpenInNewViewport
mustOpenInNewViewport()
Definition:
hasActionTrait.php:54
ILIAS\GlobalScreen\Scope\Footer\Factory\withAction
withAction(URI|Signal|string $action)
Definition:
hasActionTrait.php:35
ILIAS\GlobalScreen\Scope\Footer\Factory\withOpenInNewViewport
withOpenInNewViewport(bool $state)
Definition:
hasActionTrait.php:47
ILIAS\GlobalScreen\Scope\Footer\Factory\$open_in_new_viewport
bool $open_in_new_viewport
Definition:
hasActionTrait.php:33
hasActionTrait
ILIAS\GlobalScreen\Scope\Footer\Factory\getAction
getAction()
Definition:
hasActionTrait.php:42
ILIAS\Data\URI
ILIAS\GlobalScreen\Scope\Footer\Factory
Definition:
AbstractBaseItem.php:21
Signal
components
ILIAS
GlobalScreen
src
Scope
Footer
Factory
hasActionTrait.php
Generated on Sun Aug 31 2025 23:03:02 for ILIAS by
1.8.13 (using
Doxyfile
)