Passed
Push — master ( 1ddab6...9156c7 )
by WEBEWEB
03:31
created

WBWJQueryDataTablesBundle   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Importance

Changes 4
Bugs 0 Features 1
Metric Value
wmc 4
eloc 6
c 4
b 0
f 1
dl 0
loc 37
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getTranslationDomain() 0 2 1
A getContainerExtension() 0 2 1
A build() 0 2 1
A getAssetsRelativeDirectory() 0 2 1
1
<?php
2
3
/*
4
 * This file is part of the jquery-datatables-bundle package.
5
 *
6
 * (c) 2018 WEBEWEB
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace WBW\Bundle\JQuery\DataTablesBundle;
13
14
use Symfony\Component\DependencyInjection\ContainerBuilder;
15
use Symfony\Component\DependencyInjection\Extension\Extension;
16
use Symfony\Component\HttpKernel\Bundle\Bundle;
17
use WBW\Bundle\CoreBundle\Provider\AssetsProviderInterface;
18
use WBW\Bundle\JQuery\DataTablesBundle\DependencyInjection\Compiler\DataTablesProviderCompilerPass;
19
use WBW\Bundle\JQuery\DataTablesBundle\DependencyInjection\WBWJQueryDataTablesExtension;
20
21
/**
22
 * jQuery DataTables bundle.
23
 *
24
 * @author webeweb <https://github.com/webeweb>
25
 * @package WBW\Bundle\jQuery\DatatablesBundle
26
 */
27
class WBWJQueryDataTablesBundle extends Bundle implements AssetsProviderInterface {
28
29
    /**
30
     * Translation domain.
31
     *
32
     * @var string
33
     */
34
    const TRANSLATION_DOMAIN = "WBWJQueryDataTablesBundle";
35
36
    /**
37
     * {@inheritdoc}
38
     */
39
    public function build(ContainerBuilder $container): void {
40
        $container->addCompilerPass(new DataTablesProviderCompilerPass());
41
    }
42
43
    /**
44
     * {@inheritdoc}
45
     */
46
    public function getAssetsRelativeDirectory(): string {
47
        return self::ASSETS_RELATIVE_DIRECTORY;
48
    }
49
50
    /**
51
     * {@inheritdoc}
52
     */
53
    public function getContainerExtension(): Extension {
54
        return new WBWJQueryDataTablesExtension();
55
    }
56
57
    /**
58
     * Get the translation domain.
59
     *
60
     * @return string Returns the translation domain.
61
     */
62
    public static function getTranslationDomain(): string {
63
        return self::TRANSLATION_DOMAIN;
64
    }
65
}
66