23use Psr\Http\Message\RequestInterface;
24use ILIAS\GlobalScreen\GUI\I18n\Translator;
33 private readonly Translator $translator,
34 private ?
Group $group =
null,
37 $this->ui_factory =
$DIC->ui()->factory();
44 $ff = $this->ui_factory->input()->field();
48 ->text($this->translator->translate(
'title',
'group'))
49 ->withValue($this->group->getTitle())
50 ->withAdditionalTransformation(
51 $this->
refinery->custom()->transformation(function (
string $value):
string {
52 $this->group = $this->group->withTitle($value);
59 ->checkbox($this->translator->translate(
'active',
'group'))
60 ->withValue($this->group->isActive())
61 ->withAdditionalTransformation(
62 $this->
refinery->custom()->transformation(function (
bool $value):
bool {
63 $this->group = $this->group->withActive($value);
73 return $this->ui_factory
79 $this->
refinery->custom()->transformation(fn(array $value): ?
Group => $this->group)
83 public function store(RequestInterface $request,
string $target): bool
85 $form = $this->
get($target)->withRequest($request);
86 $data = $form->getData();
Builds a Color from either hex- or rgb values.
This is how the factory for UI elements looks.