ILIAS  trunk Revision v11.0_alpha-1866-gfa368f7776e
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
Modal.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
24 
28 class Modal extends AbstractBaseItem implements canHaveParent
29 {
30  use hasTitleTrait;
32 
33  public function __construct(
34  IdentificationInterface $provider_identification,
35  string $title,
36  protected \ILIAS\UI\Component\Modal\Modal $modal
37  ) {
38  parent::__construct($provider_identification);
39  $this->title = $title;
40  }
41 
42  public function getModal(): \ILIAS\UI\Component\Modal\Modal
43  {
44  return $this->modal;
45  }
46 
47  public function withModal(\ILIAS\UI\Component\Modal\Modal $modal): self
48  {
49  $clone = clone $this;
50  $clone->modal = $modal;
51  return $clone;
52  }
53 
54  public function isTop(): bool
55  {
56  return !$this->hasParent();
57  }
58 
59 }
withModal(\ILIAS\UI\Component\Modal\Modal $modal)
Definition: Modal.php:47
Interface Observer Contains several chained tasks and infos about them.
__construct(IdentificationInterface $provider_identification, string $title, protected \ILIAS\UI\Component\Modal\Modal $modal)
Definition: Modal.php:33
__construct(Container $dic, ilPlugin $plugin)