ILIAS  trunk Revision v11.0_alpha-1753-gb21ca8c4367
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
FieldSelection.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
30 
31 class FieldSelection extends ViewControlInput implements VCInterface\FieldSelection
32 {
34  protected string $button_label = '';
35 
36  public function __construct(
37  DataFactory $data_factory,
39  SignalGeneratorInterface $signal_generator,
40  protected array $options
41  ) {
42  parent::__construct($data_factory, $refinery);
43  $this->internal_selection_signal = $signal_generator->create();
44  }
45 
46  protected function isClientSideValueOk($value): bool
47  {
48  return is_null($value) || is_array($value);
49  }
50 
51  public function getInternalSignal(): Signal
52  {
54  }
55 
56  public function getOptions(): array
57  {
58  return $this->options;
59  }
60 
61  public function getButtonLabel(): string
62  {
63  return $this->button_label;
64  }
65 
66  public function withButtonLabel(string $button_label): self
67  {
68  $clone = clone $this;
69  $clone->button_label = $button_label;
70  return $clone;
71  }
72 
73  public function withAriaLabel(string $label): self
74  {
75  $clone = clone $this;
76  $clone->label = $label;
77  return $clone;
78  }
79 }
__construct(DataFactory $data_factory, Refinery $refinery, SignalGeneratorInterface $signal_generator, protected array $options)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
create(string $class='')
Create a signal, each created signal MUST have a unique ID.
__construct(Container $dic, ilPlugin $plugin)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Factory.php:21
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Factory.php:21