for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the Sylius package.
*
* (c) Paweł Jędrzejewski
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Sylius\Bundle\SettingsBundle\Twig;
use Sylius\Bundle\SettingsBundle\Templating\Helper\SettingsHelperInterface;
/**
* @author Paweł Jędrzejewski <[email protected]>
final class SettingsExtension extends \Twig_Extension
{
* @var SettingsHelperInterface
private $helper;
* @param SettingsHelperInterface $helper
public function __construct(SettingsHelperInterface $helper)
$this->helper = $helper;
}
* {@inheritdoc}
public function getFunctions()
return [
new \Twig_SimpleFunction('sylius_settings', [$this->helper, 'getSettings']),
];
public function getName()
return 'sylius_settings';