ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
hasActionTrait.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
25
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 }
60 }
61}
The scope of this class is split ilias-conform URI's into components.
Definition: URI.php:35
withAction(URI|Signal|string $action)