ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
Panel.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
24use ILIAS\UI\Implementation\Component\ComponentHelper;
26
31class Panel implements C\Panel\Panel
32{
33 use ComponentHelper;
34
38 private $content;
39 protected string $title;
40 protected ?C\Dropdown\Standard $actions = null;
41
45 public function __construct(string $title, $content)
46 {
47 $content = $this->toArray($content);
48 $types = [Component::class];
49 $this->checkArgListElements("content", $content, $types);
50
51 $this->title = $title;
52 $this->content = $content;
53 }
54
58 public function getTitle(): string
59 {
60 return $this->title;
61 }
62
66 public function getContent()
67 {
68 return $this->content;
69 }
70
74 public function withActions(C\Dropdown\Standard $actions): C\Panel\Panel
75 {
76 $clone = clone $this;
77 $clone->actions = $actions;
78 return $clone;
79 }
80
84 public function getActions(): ?C\Dropdown\Standard
85 {
86 return $this->actions;
87 }
88}
__construct(string $title, $content)
Definition: Panel.php:45
withActions(C\Dropdown\Standard $actions)
Definition: Panel.php:74
A component is the most general form of an entity in the UI.
Definition: Component.php:28