ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
Drilldown.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
22 
27 
31 class Drilldown extends Menu implements IMenu\Drilldown
32 {
34 
35  protected Signal $signal;
36  protected ?string $persistence_id = null;
37 
41  public function __construct(
42  SignalGeneratorInterface $signal_generator,
43  string $label,
44  array $items
45  ) {
46  $this->checkItemParameter($items);
47  $this->label = $label;
48  $this->items = $items;
49  $this->signal = $signal_generator->create();
50  }
51 
52  public function getBacklinkSignal(): Signal
53  {
54  return $this->signal;
55  }
56 
57  public function withPersistenceId(?string $id): self
58  {
59  if (is_null($id)) {
60  return $this;
61  }
62  $clone = clone $this;
63  $clone->persistence_id = $id;
64  return $clone;
65  }
66 
67  public function getPersistenceId(): ?string
68  {
69  return $this->persistence_id;
70  }
71 }
trait JavaScriptBindable
Trait for components implementing JavaScriptBindable providing standard implementation.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Drilldown.php:21
create(string $class='')
Create a signal, each created signal MUST have a unique ID.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Drilldown.php:21
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
This describes a Drilldown Menu Control.
Definition: Drilldown.php:28
__construct(SignalGeneratorInterface $signal_generator, string $label, array $items)
Definition: Drilldown.php:41