Conditions | 2 |
Paths | 2 |
Total Lines | 18 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
27 | public function getDashboardActions() |
||
28 | { |
||
29 | if (!$this instanceof AbstractAdmin) { |
||
30 | throw new InvalidArgumentException(sprintf('Class "%s" must by instanceof "Sonata\AdminBundle\Admin\AbstractAdmin"', |
||
31 | get_class($this) |
||
32 | )); |
||
33 | } |
||
34 | $actions = parent::getDashboardActions(); |
||
35 | |||
36 | $actions['import'] = array( |
||
37 | 'label' => 'Import', |
||
38 | 'url' => $this->generateUrl('import'), |
||
39 | 'icon' => 'upload', |
||
40 | 'translation_domain' => 'SonataAdminBundle', // optional |
||
41 | 'template' => 'SonataAdminBundle:CRUD:dashboard__action.html.twig', // optional |
||
42 | ); |
||
43 | |||
44 | return $actions; |
||
45 | } |
||
48 |