1 | <?php |
||
25 | class Href extends Action |
||
26 | 1 | { |
|
27 | /** @var string first param for method $presenter->link() */ |
||
28 | protected $destination; |
||
29 | |||
30 | /** @var array second param for method $presenter->link() */ |
||
31 | protected $arguments = []; |
||
32 | |||
33 | /** @var callback for custom href attribute creating */ |
||
34 | protected $customHref; |
||
35 | |||
36 | /** |
||
37 | * @param \Grido\Grid $grid |
||
38 | * @param string $name |
||
39 | * @param string $label |
||
40 | * @param string $destination - first param for method $presenter->link() |
||
41 | * @param array $arguments - second param for method $presenter->link() |
||
42 | */ |
||
43 | public function __construct($grid, $name, $label, $destination = NULL, array $arguments = []) |
||
50 | |||
51 | /** |
||
52 | * Sets callback for custom link creating. |
||
53 | * @param callback $callback |
||
54 | * @return Href |
||
55 | */ |
||
56 | public function setCustomHref($callback) |
||
61 | |||
62 | /**********************************************************************************************/ |
||
63 | |||
64 | /** |
||
65 | * @param mixed $row |
||
66 | * @return \Nette\Utils\Html |
||
67 | * @internal |
||
68 | */ |
||
69 | public function getElement($row) |
||
87 | |||
88 | /** |
||
89 | * @return string |
||
90 | * @internal |
||
91 | */ |
||
92 | public function getDestination() |
||
100 | |||
101 | /** |
||
102 | * @return array |
||
103 | * @internal |
||
104 | */ |
||
105 | public function getArguments() |
||
109 | } |
||
110 |