ILIAS  trunk Revision v11.0_alpha-1753-gb21ca8c4367
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
LSLocatorBuilder.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
23 
25 {
29  protected array $items;
30 
31  protected string $command;
33 
34  public function __construct(string $command, ControlBuilder $control_builder)
35  {
36  $this->command = $command;
37  $this->control_builder = $control_builder;
38  }
39 
43  public function getItems(): array
44  {
45  return $this->items;
46  }
47 
51  public function end(): ControlBuilder
52  {
54  }
55 
59  public function item(string $label, int $parameter): LocatorBuilder
60  {
61  $this->items[] = [
62  'label' => $label,
63  'command' => $this->command,
64  'parameter' => $parameter
65  ];
66  return $this;
67  }
68 }
item(string $label, int $parameter)
Build an entry in the locator.The parameter will be appended to the command when updating state...
ControlBuilder $control_builder
end()
Finish building the locator.
Build controls for the view.
Build a locator for the view.
__construct(string $command, ControlBuilder $control_builder)