ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
Standard.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 2017 Alex Killing <killing@leifos.de> Extended GPL, see docs/LICENSE */
4 
6 
7 use ILIAS\UI\Component as C;
8 
9 class Standard extends Item implements C\Item\Standard
10 {
14  protected $color = null;
18  protected $lead = null;
19 
23  public function withColor(\ILIAS\Data\Color $color) : C\Item\Item
24  {
25  $clone = clone $this;
26  $clone->color = $color;
27  return $clone;
28  }
29 
33  public function getColor() : ?\ILIAS\Data\Color
34  {
35  return $this->color;
36  }
37 
41  public function withLeadImage(\ILIAS\UI\Component\Image\Image $image) : C\Item\Item
42  {
43  $clone = clone $this;
44  $clone->lead = $image;
45  return $clone;
46  }
47 
51  public function withLeadIcon(\ILIAS\UI\Component\Symbol\Icon\Icon $icon) : C\Item\Item
52  {
53  $clone = clone $this;
54  $clone->lead = $icon;
55  return $clone;
56  }
57 
61  public function withLeadText(string $text) : C\Item\Item
62  {
63  $this->checkStringArg("lead_text", $text);
64  $clone = clone $this;
65  $clone->lead = (string) $text;
66  return $clone;
67  }
68 
72  public function withNoLead() : C\Item\Item
73  {
74  $clone = clone $this;
75  $clone->lead = null;
76  return $clone;
77  }
78 
82  public function getLead()
83  {
84  return $this->lead;
85  }
86 }
Class Factory.
Class ChatMainBarProvider .
checkStringArg($which, $value)
Throw an InvalidArgumentException if $value is no string.
Common interface to all items.
Definition: Item.php:13
withLeadImage(\ILIAS\UI\Component\Image\Image $image)
Definition: Standard.php:41
withLeadIcon(\ILIAS\UI\Component\Symbol\Icon\Icon $icon)
Definition: Standard.php:51