custom/plugins/SwagPublisher/src/SwagPublisher.php line 16

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. /*
  3.  * (c) shopware AG <info@shopware.com>
  4.  * For the full copyright and license information, please view the LICENSE
  5.  * file that was distributed with this source code.
  6.  */
  7. namespace SwagPublisher;
  8. use Shopware\Core\Framework\Plugin;
  9. use SwagPublisher\Common\ActionSetUpCompilerPass;
  10. use Symfony\Component\Config\FileLocator;
  11. use Symfony\Component\DependencyInjection\ContainerBuilder;
  12. use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
  13. class SwagPublisher extends Plugin
  14. {
  15.     /**
  16.      * {@inheritdoc}
  17.      */
  18.     public function build(ContainerBuilder $container): void
  19.     {
  20.         parent::build($container);
  21.         $container->addCompilerPass(new ActionSetUpCompilerPass());
  22.         $loader = new XmlFileLoader($container, new FileLocator(__DIR__ '/VersionControlSystem/'));
  23.         $loader->load('version-control-system.xml');
  24.     }
  25. }