for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the bootstrap-bundle package.
*
* (c) 2018 WEBEWEB
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace WBW\Bundle\BootstrapBundle\Twig\Extension\Utility;
use Twig\Environment;
use WBW\Bundle\BootstrapBundle\Twig\Extension\AbstractTwigExtension;
use WBW\Bundle\CoreBundle\Component\Translation\BaseTranslatorInterface;
use WBW\Bundle\CoreBundle\Service\TranslatorTrait;
/**
* Abstract utility Twig extension.
* @author webeweb <https://github.com/webeweb/>
* @package WBW\Bundle\BootstrapBundle\Twig\Extension\Utility
* @abstract
abstract class AbstractUtilityTwigExtension extends AbstractTwigExtension {
use TranslatorTrait;
* Constructor.
* @param Environment $twigEnvironment The Twig environment.
* @param BaseTranslatorInterface $translator The translator.
public function __construct(Environment $twigEnvironment, $translator) {
parent::__construct($twigEnvironment);
$this->setTranslator($translator);
}