ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
Modal.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
24
28class 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
__construct(IdentificationInterface $provider_identification, string $title, protected \ILIAS\UI\Component\Modal\Modal $modal)
Definition: Modal.php:33
Definition: UI.php:24
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.