Completed
Pull Request — master (#46)
by Benjamin
03:21
created

AdminTranslation::getAvailableCommands()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 11
rs 9.4285
cc 1
eloc 7
nc 1
nop 0
1
<?php
2
3
namespace Alpixel\Bundle\CMSBundle\Admin;
4
5
use Sonata\AdminBundle\Admin\Admin;
6
use Sonata\AdminBundle\Route\RouteCollection;
7
8
/**
9
 * @author Alexis BUSSIERES <[email protected]>
10
 */
11
class AdminTranslation extends Admin
0 ignored issues
show
Deprecated Code introduced by
The class Sonata\AdminBundle\Admin\Admin has been deprecated with message: since version 3.1, to be removed in 4.0. Use Sonata\AdminBundle\AbstractAdmin instead.

This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.

Loading history...
12
{
13
    protected $baseRouteName = 'alpixel_admin_cms_command_translation';
14
    protected $baseRoutePattern = 'command/translation';
15
16
    public function configureRoutes(RouteCollection $collection)
17
    {
18
        $collection->clearExcept(['list']);
19
        $collection->add('command');
20
    }
21
22
    public static function getAvailableCommands()
23
    {
24
        return [[
25
            'name'  => 'happyr:translation:download',
26
            'arguments' => [
27
                'flush_cache' => true,
28
            ],
29
            'label' => 'Importer les traductions',
30
            'icon'  => 'download'
31
        ]];
32
    }
33
}
34