ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
AbstractBaseTool.php
Go to the documentation of this file.
1<?php declare(strict_types=1);
2
4
5use Closure;
8
13abstract class AbstractBaseTool extends AbstractParentItem implements isToolItem
14{
19 protected $close_callback;
23 protected $initially_hidden = false;
24
29 {
30 $clone = clone($this);
31 $clone->initially_hidden = $initially_hidden;
32
33 return $clone;
34 }
35
39 public function isInitiallyHidden() : bool
40 {
42 }
43
47 public function withCloseCallback(Closure $close_callback) : isToolItem
48 {
49 $clone = clone($this);
50 $clone->close_callback = $close_callback;
51
52 return $clone;
53 }
54
58 public function getCloseCallback() : Closure
59 {
61 }
62
66 public function hasCloseCallback() : bool
67 {
68 return $this->close_callback instanceof Closure;
69 }
70}
An exception for terminatinating execution or to throw for unit testing.
withCloseCallback(Closure $close_callback)
@inheritDoc
withInitiallyHidden(bool $initially_hidden)
@inheritDoc