Completed
Push — master ( 5bc326...973a57 )
by Benjamin
05:33 queued 02:50
created

AdminTranslation::configureRoutes()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
namespace Alpixel\Bundle\CMSBundle\Admin;
4
5
use Sonata\AdminBundle\Admin\AbstractAdmin;
6
use Sonata\AdminBundle\Route\RouteCollection;
7
8
/**
9
 * @author Alexis BUSSIERES <[email protected]>
10
 */
11
class AdminTranslation extends AbstractAdmin
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'      => 'alpixel:cms:translations:download',
26
            'arguments' => [
27
                'flush_cache' => true,
28
            ],
29
            'label'     => 'Importer les traductions',
30
            'icon'      => 'download'
31
        ]];
32
    }
33
}
34