ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
Standard.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
22 
23 use ILIAS\UI\Component as C;
24 
29 class Standard extends ProgressMeter implements C\Chart\ProgressMeter\Standard
30 {
31  protected ?string $main_text = null;
32  protected ?string $required_text = null;
33 
37  public function getComparison()
38  {
39  return $this->getSafe($this->comparison);
40  }
41 
45  public function getComparisonAsPercent(): int
46  {
47  return $this->getAsPercentage($this->comparison);
48  }
49 
53  public function withMainText(string $text): C\Chart\ProgressMeter\ProgressMeter
54  {
55  $this->checkStringArg("main_value_text", $text);
56 
57  $clone = clone $this;
58  $clone->main_text = $text;
59  return $clone;
60  }
61 
65  public function getMainText(): ?string
66  {
67  return $this->main_text;
68  }
69 
73  public function withRequiredText(string $text): C\Chart\ProgressMeter\ProgressMeter
74  {
75  $this->checkStringArg("required_value_text", $text);
76 
77  $clone = clone $this;
78  $clone->required_text = $text;
79  return $clone;
80  }
81 
85  public function getRequiredText(): ?string
86  {
87  return $this->required_text;
88  }
89 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Factory.php:21
getComparisonAsPercent()
Get comparison value as percent.
Definition: Standard.php:45