Completed
Push — master ( 6f962e...549eec )
by Kamil
21:17
created

SettingsHelper::hasSettingsParameter()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 12
Code Lines 6

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 12
rs 9.4285
cc 2
eloc 6
nc 2
nop 1
1
<?php
2
3
/*
4
 * This file is part of the Sylius package.
5
 *
6
 * (c) Paweł Jędrzejewski
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 Sylius\Bundle\SettingsBundle\Templating\Helper;
13
14
use Sylius\Bundle\SettingsBundle\Manager\SettingsManagerInterface;
15
use Symfony\Component\Templating\Helper\Helper;
16
17
final class SettingsHelper extends Helper implements SettingsHelperInterface
18
{
19
    /**
20
     * @var SettingsManagerInterface
21
     */
22
    private $settingsManager;
23
24
    /**
25
     * @param SettingsManagerInterface $settingsManager
26
     */
27
    public function __construct(SettingsManagerInterface $settingsManager)
28
    {
29
        $this->settingsManager = $settingsManager;
30
    }
31
32
    /**
33
     * {@inheritdoc}
34
     */
35
    public function getSettings($schemaAlias)
36
    {
37
        return $this->settingsManager->load($schemaAlias);
38
    }
39
40
    /**
41
     * {@inheritdoc}
42
     */
43
    public function getName()
44
    {
45
        return 'sylius_settings';
46
    }
47
}
48