Completed
Push — api ( cecea0...116a36 )
by Kamil
29:57 queued 30s
created

getWhitelistedVariables()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Sylius\Bundle\UiBundle\Twig;
6
7
use Twig\Extension\AbstractExtension;
8
use Twig\TwigFunction;
9
10
/**
11
 * @internal
12
 * @experimental
13
 */
14
final class LegacySonataBlockExtension extends AbstractExtension
15
{
16
    /** @var array */
17
    private $whitelistedVariables;
18
19
    public function __construct(array $whitelistedVariables)
20
    {
21
        $this->whitelistedVariables = $whitelistedVariables;
22
    }
23
24
    public function getFunctions(): array
25
    {
26
        return [
27
            new TwigFunction('sonata_block_whitelisted_variables', [$this, 'getWhitelistedVariables']),
28
        ];
29
    }
30
31
    public function getWhitelistedVariables(): array
32
    {
33
        return $this->whitelistedVariables;
34
    }
35
}
36