for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is a part of Sculpin.
*
* (c) Dragonfly Development Inc.
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Sculpin\Bundle\TwigBundle;
use Sculpin\Bundle\TwigBundle\DependencyInjection\Compiler\TwigEnvironmentPass;
use Sculpin\Bundle\TwigBundle\DependencyInjection\Compiler\TwigLoaderPass;
use Sculpin\Bundle\TwigBundle\DependencyInjection\Configuration;
use Symfony\Component\Config\Definition\ConfigurationInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symplify\SimpleBundle\AbstractSimpleBundle;
final class SculpinTwigBundle extends AbstractSimpleBundle
{
/**
* @var string
const FORMATTER_NAME = 'twig';
* {@inheritdoc}
public function build(ContainerBuilder $container)
$container->addCompilerPass(new TwigEnvironmentPass());
$container->addCompilerPass(new TwigLoaderPass());
}
protected function getServicesFile() : string
return __DIR__.'/Resources/config/services.yml';
protected function getConfiguration() : ConfigurationInterface
return new Configuration();
protected function getParametersAliases() : array
return [
'source_view_paths' => 'sculpin_twig.source_view_paths',
'view_paths' => 'sculpin_twig.view_paths',
'extensions' => 'sculpin_twig.extensions',
];