1 | <?php |
||
8 | abstract class AbstractTool implements Renderable |
||
9 | { |
||
10 | /** |
||
11 | * @var Grid |
||
12 | */ |
||
13 | protected $grid; |
||
14 | |||
15 | /** |
||
16 | * @var bool |
||
17 | */ |
||
18 | protected $disabled = false; |
||
19 | |||
20 | /** |
||
21 | * Toggle this button. |
||
22 | * |
||
23 | * @param bool $disable |
||
24 | * |
||
25 | * @return $this |
||
26 | */ |
||
27 | public function disable(bool $disable = true) |
||
33 | |||
34 | /** |
||
35 | * If the tool is allowed. |
||
36 | */ |
||
37 | public function allowed() |
||
41 | |||
42 | /** |
||
43 | * Set parent grid. |
||
44 | * |
||
45 | * @param Grid $grid |
||
46 | * |
||
47 | * @return $this |
||
48 | */ |
||
49 | public function setGrid(Grid $grid) |
||
55 | |||
56 | /** |
||
57 | * {@inheritdoc} |
||
58 | */ |
||
59 | abstract public function render(); |
||
60 | |||
61 | /** |
||
62 | * @return string |
||
63 | */ |
||
64 | public function __toString() |
||
68 | } |
||
69 |