ILIAS  release_8 Revision v8.23
AbstractBaseTool.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
23 use Closure;
26 
31 abstract class AbstractBaseTool extends AbstractParentItem implements isToolItem
32 {
34 
35  protected ?Closure $close_callback = null;
36 
37  protected bool $initially_hidden = false;
38 
42  public function withInitiallyHidden(bool $initially_hidden): isToolItem
43  {
44  $clone = clone($this);
45  $clone->initially_hidden = $initially_hidden;
46 
47  return $clone;
48  }
49 
53  public function isInitiallyHidden(): bool
54  {
56  }
57 
61  public function withCloseCallback(Closure $close_callback): isToolItem
62  {
63  $clone = clone($this);
64  $clone->close_callback = $close_callback;
65 
66  return $clone;
67  }
68 
72  public function getCloseCallback(): Closure
73  {
74  return $this->close_callback;
75  }
76 
80  public function hasCloseCallback(): bool
81  {
82  return $this->close_callback instanceof Closure;
83  }
84 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...