SonataUserBundle.php 958 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /*
  3. * This file is part of the Sonata project.
  4. *
  5. * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Sonata\UserBundle;
  11. use Symfony\Component\HttpKernel\Bundle\Bundle;
  12. use Symfony\Component\DependencyInjection\ContainerBuilder;
  13. use Sonata\UserBundle\DependencyInjection\Compiler\GlobalVariablesCompilerPass;
  14. class SonataUserBundle extends Bundle
  15. {
  16. protected $parent;
  17. /**
  18. * @param string $parent
  19. */
  20. public function __construct($parent = null)
  21. {
  22. $this->parent = $parent;
  23. }
  24. /**
  25. * {@inheritdoc}
  26. */
  27. public function getParent()
  28. {
  29. return $this->parent;
  30. }
  31. /**
  32. * {@inheritdoc}
  33. */
  34. public function build(ContainerBuilder $container)
  35. {
  36. $container->addCompilerPass(new GlobalVariablesCompilerPass());
  37. }
  38. }