ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
Complex.php
Go to the documentation of this file.
2
3use Closure;
11use ILIAS\GlobalScreen\Scope\MainMenu\Factory\isInterchangeableItemTrait;
15
21{
24 use isInterchangeableItemTrait;
25
33 private $content;
37 private $title = '';
41 private $supports_async_loading = false;
42
47 {
48 $clone = clone($this);
49 $clone->content_wrapper = $content_wrapper;
50
51 return $clone;
52 }
53
57 public function withContent(Component $ui_component) : hasContent
58 {
59 $clone = clone($this);
60 $clone->content = $ui_component;
61
62 return $clone;
63 }
64
68 public function getContent() : Component
69 {
70 if ($this->content_wrapper !== null) {
71 $wrapper = $this->content_wrapper;
72
73 return $wrapper();
74 }
75
76 return $this->content;
77 }
78
83 public function withTitle(string $title) : hasTitle
84 {
85 $clone = clone($this);
86 $clone->title = $title;
87
88 return $clone;
89 }
90
94 public function getTitle() : string
95 {
96 return $this->title;
97 }
98
103 {
104 $clone = clone($this);
105 $clone->supports_async_loading = $supported;
106
107 return $clone;
108 }
109
113 public function supportsAsynchronousLoading() : bool
114 {
116 }
117}
An exception for terminatinating execution or to throw for unit testing.
withSupportsAsynchronousLoading(bool $supported)
@inheritDoc
Definition: Complex.php:102
withContentWrapper(Closure $content_wrapper)
@inheritDoc
Definition: Complex.php:46
withContent(Component $ui_component)
@inheritDoc
Definition: Complex.php:57
Interface hasSymbol Methods for Entries with Symbols.
Definition: hasSymbol.php:12
A component is the most general form of an entity in the UI.
Definition: Component.php:14
trait hasSymbolTrait
Trait hasSymbolTrait.