ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
Complex.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
23 use Closure;
35 
40 class Complex extends AbstractChildItem implements
41  hasContent,
42  hasTitle,
43  hasSymbol,
46  isChild
47 {
49  use hasSymbolTrait;
51 
59  private $content;
63  private $title = '';
67  private $supports_async_loading = false;
68 
73  {
74  $clone = clone($this);
75  $clone->content_wrapper = $content_wrapper;
76 
77  return $clone;
78  }
79 
83  public function withContent(Component $ui_component) : hasContent
84  {
85  $clone = clone($this);
86  $clone->content = $ui_component;
87 
88  return $clone;
89  }
90 
94  public function getContent() : Component
95  {
96  if ($this->content_wrapper !== null) {
97  $wrapper = $this->content_wrapper;
98 
99  return $wrapper();
100  }
101 
102  return $this->content;
103  }
104 
109  public function withTitle(string $title) : hasTitle
110  {
111  $clone = clone($this);
112  $clone->title = $title;
113 
114  return $clone;
115  }
116 
120  public function getTitle() : string
121  {
122  return $this->title;
123  }
124 
129  {
130  $clone = clone($this);
131  $clone->supports_async_loading = $supported;
132 
133  return $clone;
134  }
135 
139  public function supportsAsynchronousLoading() : bool
140  {
142  }
143 }
Interface supportsAsynchronousLoading Types, which implement this interface, can load their content a...
Interface hasSymbol Methods for Entries with Symbols.
Definition: hasSymbol.php:32
trait hasSymbolTrait
Trait hasSymbolTrait.