19declare(strict_types=1);
23use ILIAS\UI\Implementation\Component\ComponentHelper;
44 protected string $title
55 $class = explode(
'\\', $this::class);
56 return array_pop($class);
63 $clone->sortable = $flag;
69 return $this->sortable;
73 ?
string $asc_label =
null,
74 ?
string $desc_label =
null
77 $clone->asc_label = $asc_label;
78 $clone->desc_label = $desc_label;
88 $this->asc_label ?? $this->
getTitle() . self::SEPERATOR . $this->
lng->txt(
'order_option_generic_ascending'),
89 $this->desc_label ?? $this->
getTitle() . self::SEPERATOR . $this->
lng->txt(
'order_option_generic_descending')
93 public function withIsOptional(
bool $is_optional,
bool $is_initially_visible =
true): self
96 $clone->optional = $is_optional;
97 $clone->initially_visible = $is_initially_visible;
103 return $this->optional;
108 return $this->initially_visible;
113 $clone = clone $this;
114 $clone->index = $index;
125 $clone = clone $this;
126 $clone->highlighted = $flag;
132 return $this->highlighted;
137 return (
string) $value;
withIsOptional(bool $is_optional, bool $is_initially_visible=true)
withHighlight(bool $flag)
withIsSortable(bool $flag)
withOrderingLabels(?string $asc_label=null, ?string $desc_label=null)
__construct(protected Language $lng, protected string $title)
A component is the most general form of an entity in the UI.