ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
Shy.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
21 
22 use ILIAS\UI\Component\Item\Shy as IShy;
27 
28 class 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 }
This describes how an icon could be modified during construction of UI.
Definition: Icon.php:28
trait JavaScriptBindable
Trait for components implementing JavaScriptBindable providing standard implementation.
Common interface to all items.
Definition: Item.php:31
withClose(Close $close)
Get a copy of that shy with a close button.
Definition: Shy.php:46
withLeadIcon(Icon $lead)
Get a copy of that shy with a lead icon.
Definition: Shy.php:61
__construct(Container $dic, ilPlugin $plugin)
This describes a close button.
Definition: Close.php:33
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Factory.php:21