ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
BarConfig.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
24
29{
30 protected ?Color $color = null;
31 protected ?float $size = null;
32
33 public function __construct()
34 {
35 }
36
37 public function withColor(Color $color): self
38 {
39 $clone = clone $this;
40 $clone->color = $color;
41 return $clone;
42 }
43
44 public function getColor(): ?Color
45 {
46 return $this->color;
47 }
48
55 public function withRelativeWidth(float $relative_width): self
56 {
57 $clone = clone $this;
58 $clone->size = $relative_width;
59 return $clone;
60 }
61
62 public function getRelativeWidth(): ?float
63 {
64 return $this->size;
65 }
66}
Color expresses a certain color by giving the mixing ratio in the RGB color space.
Definition: Color.php:30
withRelativeWidth(float $relative_width)
Set a relative width for the bar.
Definition: BarConfig.php:55