ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
Shy.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
21
25use ILIAS\UI\Component\JavaScriptBindable as IJavaScriptBindable;
27
28class Shy extends Item implements IShy, IJavaScriptBindable
29{
31
32 protected ?Icon $lead_icon = null;
33 protected ?Close $close = null;
34
38 public function __construct(string $title)
39 {
40 parent::__construct($title);
41 }
42
46 public function withClose(Close $close): IShy
47 {
48 $clone = clone $this;
49 $clone->close = $close;
50 return $clone;
51 }
52
53 public function getClose(): ?Close
54 {
55 return $this->close;
56 }
57
61 public function withLeadIcon(Icon $lead): IShy
62 {
63 $clone = clone $this;
64 $clone->lead_icon = $lead;
65 return $clone;
66 }
67
68 public function getLeadIcon(): ?Icon
69 {
70 return $this->lead_icon;
71 }
72}
withLeadIcon(Icon $lead)
Get a copy of that shy with a lead icon.
Definition: Shy.php:61
withClose(Close $close)
Get a copy of that shy with a close button.
Definition: Shy.php:46
This describes a close button.
Definition: Close.php:34
Common interface to all items.
Definition: Item.php:32
Interface to be extended by components that have the possibility to bind to Javascript.
This describes how an icon could be modified during construction of UI.
Definition: Icon.php:29
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
trait JavaScriptBindable
Trait for components implementing JavaScriptBindable providing standard implementation.