Total Complexity | 6 |
Total Lines | 55 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | abstract class BaseAction |
||
15 | { |
||
16 | use Configurable, Attributable; |
||
17 | |||
18 | const BOOTSTRAP_COL_WIDTH = 4; |
||
19 | |||
20 | /** |
||
21 | * @var string|Closure|null |
||
22 | */ |
||
23 | protected $url; |
||
24 | |||
25 | /** |
||
26 | * BaseButton constructor. |
||
27 | * @param array $config |
||
28 | */ |
||
29 | public function __construct(array $config = []) |
||
30 | { |
||
31 | $this->loadConfig($config); |
||
32 | } |
||
33 | |||
34 | /** |
||
35 | * @param $row |
||
36 | * @param int $bootstrapColWidth |
||
37 | * @return mixed |
||
38 | */ |
||
39 | abstract public function render($row, int $bootstrapColWidth = self::BOOTSTRAP_COL_WIDTH); |
||
40 | |||
41 | /** |
||
42 | * Build url for some actions. |
||
43 | * @param $row |
||
44 | */ |
||
45 | abstract protected function buildUrl($row); |
||
46 | |||
47 | /** |
||
48 | * @param $row |
||
49 | * @return mixed|string |
||
50 | */ |
||
51 | protected function getUrl($row) |
||
61 | } |
||
62 | |||
63 | /** |
||
64 | * @return string |
||
65 | */ |
||
66 | protected function getCurrentUrl() |
||
69 | } |
||
70 | } |
||
71 |