ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ScaleBar.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 2016 Timon Amstutz <timon.amstutz@ilub.unibe.ch> Extended GPL, see docs/LICENSE */
4 
5 use ILIAS\UI\Component as C;
7 
12 class ScaleBar implements C\Chart\ScaleBar
13 {
14  use ComponentHelper;
15 
19  protected $items;
20 
24  public function __construct($items)
25  {
26  $this->items = $items;
27  }
28 
32  public function withItems(array $items)
33  {
34  $clone = clone $this;
35  $clone->items = $items;
36  return $clone;
37  }
38 
42  public function getItems()
43  {
44  return $this->items;
45  }
46 }
trait ComponentHelper
Provides common functionality for component implementations.