19declare(strict_types=1);
23use ILIAS\UI\Implementation\Component\ComponentHelper;
39 protected \ilLanguage
$lng;
56 $class = explode(
'\\', static::class);
57 return array_pop($class);
64 $clone->sortable = $flag;
70 return $this->sortable;
74 string $asc_label =
null,
75 string $desc_label =
null
78 $clone->asc_label = $asc_label;
79 $clone->desc_label = $desc_label;
89 $this->asc_label ?? $this->getTitle() . self::SEPERATOR . $this->
lng->txt(
'order_option_generic_ascending'),
90 $this->desc_label ?? $this->getTitle() . self::SEPERATOR . $this->
lng->txt(
'order_option_generic_descending')
94 public function withIsOptional(
bool $is_optional,
bool $is_initially_visible =
true): self
97 $clone->optional = $is_optional;
98 $clone->initially_visible = $is_initially_visible;
104 return $this->optional;
109 return $this->initially_visible;
114 $clone = clone $this;
126 $clone = clone $this;
127 $clone->highlighted = $flag;
133 return $this->highlighted;
141 return (
string) $value;
withIsOptional(bool $is_optional, bool $is_initially_visible=true)
withHighlight(bool $flag)
withIsSortable(bool $flag)
__construct(\ilLanguage $lng, string $title)
withOrderingLabels(string $asc_label=null, string $desc_label=null)
A component is the most general form of an entity in the UI.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...