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