Completed
Push — master ( 31f986...46b523 )
by WEBEWEB
02:32
created

GridTwigExtension   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 32
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getFunctions() 0 9 1
1
<?php
2
3
/**
4
 * This file is part of the bootstrap-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\AdminBSBBundle\Twig\Extension\Grid;
13
14
use Twig_SimpleFunction;
15
use WBW\Bundle\BootstrapBundle\Twig\Extension\Grid\GridTwigExtension as BaseTwigExtension;
16
17
/**
18
 * Grid Twig extension.
19
 *
20
 * @author webeweb <https://github.com/webeweb/>
21
 * @package WBW\Bundle\AdminBSBBundle\Twig\Extension\Grid
22
 */
23
class GridTwigExtension extends BaseTwigExtension {
24
25
    /**
26
     * Service name.
27
     *
28
     * @var string
29
     */
30
    const SERVICE_NAME = "webeweb.bundle.adminbsbbundle.twig.extension.grid.grid";
31
32
    /**
33
     * Constructor.
34
     */
35
    public function __construct() {
36
        parent::__construct();
37
    }
38
39
    /**
40
     * Get the Twig functions.
41
     *
42
     * @return array Returns the Twig functions.
43
     */
44
    public function getFunctions() {
45
        return [
46
            new Twig_SimpleFunction("adminBSBGrid", [$this, "bootstrapGridFunction"], ["is_safe" => ["html"]]),
47
            new Twig_SimpleFunction("adminBSBOffsetGrid", [$this, "bootstrapOffsetGridFunction"], ["is_safe" => ["html"]]),
48
            new Twig_SimpleFunction("adminBSBPullGrid", [$this, "bootstrapPullGridFunction"], ["is_safe" => ["html"]]),
49
            new Twig_SimpleFunction("adminBSBPushGrid", [$this, "bootstrapPushGridFunction"], ["is_safe" => ["html"]]),
50
            new Twig_SimpleFunction("adminBSBStackedGrid", [$this, "bootstrapStackedGridFunction"], ["is_safe" => ["html"]]),
51
        ];
52
    }
53
54
}
55