vendor/vich/uploader-bundle/VichUploaderBundle.php line 14

Open in your IDE?
  1. <?php
  2. namespace Vich\UploaderBundle;
  3. use Symfony\Component\DependencyInjection\Compiler\PassConfig;
  4. use Symfony\Component\DependencyInjection\ContainerBuilder;
  5. use Symfony\Component\HttpKernel\Bundle\Bundle;
  6. use Vich\UploaderBundle\DependencyInjection\Compiler\RegisterMappingDriversPass;
  7. use Vich\UploaderBundle\DependencyInjection\Compiler\RegisterPropelModelsPass;
  8. /**
  9.  * @author Dustin Dobervich <ddobervich@gmail.com>
  10.  */
  11. class VichUploaderBundle extends Bundle
  12. {
  13.     /**
  14.      * {@inheritdoc}
  15.      */
  16.     public function build(ContainerBuilder $container): void
  17.     {
  18.         parent::build($container);
  19.         $container->addCompilerPass(new RegisterMappingDriversPass());
  20.         $container->addCompilerPass(new RegisterPropelModelsPass(), PassConfig::TYPE_BEFORE_REMOVING);
  21.     }
  22. }