1 | <?php |
||
27 | class Event extends Action |
||
28 | 1 | { |
|
29 | /** @var callable function($id, Grido\Components\Actions\Event $event) */ |
||
30 | private $onClick; |
||
31 | |||
32 | /** |
||
33 | * @param \Grido\Grid $grid |
||
34 | * @param string $name |
||
35 | * @param string $label |
||
36 | * @param callable $onClick |
||
37 | * @throws Exception |
||
38 | */ |
||
39 | public function __construct($grid, $name, $label, $onClick = NULL) |
||
53 | |||
54 | /** |
||
55 | * Sets on-click handler. |
||
56 | * @param callable $onClick function($id, Grido\Components\Actions\Event $event) |
||
57 | * @return \Grido\Components\Actions\Event |
||
58 | */ |
||
59 | public function setOnClick(callable $onClick) |
||
64 | |||
65 | /** |
||
66 | * Returns on-click handler. |
||
67 | * @return callable |
||
68 | */ |
||
69 | public function getOnClick() |
||
73 | |||
74 | /**********************************************************************************************/ |
||
75 | |||
76 | /** |
||
77 | * @param mixed $row |
||
78 | * @return \Nette\Utils\Html |
||
79 | * @internal |
||
80 | */ |
||
81 | public function getElement($row) |
||
90 | |||
91 | /**********************************************************************************************/ |
||
92 | |||
93 | /** |
||
94 | * @param int $id |
||
95 | * @internal |
||
96 | */ |
||
97 | public function handleClick($id) |
||
101 | } |
||
102 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.