for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
/*
* This file is part of the Sonata Project package.
*
* (c) Thomas Rabaix <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Sonata\MediaBundle\Twig;
use Sonata\MediaBundle\Extra\Pixlr;
use Sonata\MediaBundle\Provider\Pool;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* GlobalVariables.
* @final since sonata-project/media-bundle 3.21.0
* @author Thomas Rabaix <[email protected]>
class GlobalVariables
{
protected $container;
public function __construct(ContainerInterface $container)
$this->container = $container;
}
* @return Pixlr|bool
public function getPixlr()
return $this->container->has('sonata.media.extra.pixlr') ? $this->container->get('sonata.media.extra.pixlr') : false;
* @return Pool
public function getPool()
return $this->container->get('sonata.media.pool');