Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
32 | public function __construct(\Twig_Environment $twig, array $bulkActionTemplates) |
||
33 | { |
||
34 | $this->twig = $twig; |
||
35 | $this->bulkActionTemplates = $bulkActionTemplates; |
||
36 | } |
||
37 | |||
38 | /** |
||
39 | * {@inheritdoc} |
||
40 | */ |
||
41 | public function renderBulkAction(GridViewInterface $gridView, Action $bulkAction, $data = null): string |
||
42 | { |
||
43 | $type = $bulkAction->getType(); |
||
44 | if (!isset($this->bulkActionTemplates[$type])) { |
||
45 | throw new \InvalidArgumentException(sprintf('Missing template for bulk action type "%s".', $type)); |
||
55 |