ILIAS  release_7 Revision v7.30-3-g800a261c036
AbstractBaseTool.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
23use Closure;
26
31abstract class AbstractBaseTool extends AbstractParentItem implements isToolItem
32{
34
38 protected $close_callback;
39
43 protected $initially_hidden = false;
44
49 {
50 $clone = clone($this);
51 $clone->initially_hidden = $initially_hidden;
52
53 return $clone;
54 }
55
59 public function isInitiallyHidden() : bool
60 {
62 }
63
67 public function withCloseCallback(Closure $close_callback) : isToolItem
68 {
69 $clone = clone($this);
70 $clone->close_callback = $close_callback;
71
72 return $clone;
73 }
74
78 public function getCloseCallback() : Closure
79 {
81 }
82
86 public function hasCloseCallback() : bool
87 {
88 return $this->close_callback instanceof Closure;
89 }
90}
An exception for terminatinating execution or to throw for unit testing.
withCloseCallback(Closure $close_callback)
@inheritDoc
withInitiallyHidden(bool $initially_hidden)
@inheritDoc