vendor/shopware/core/Content/Content.php line 17

  1. <?php declare(strict_types=1);
  2. namespace Shopware\Core\Content;
  3. use Shopware\Core\Content\Mail\MailerConfigurationCompilerPass;
  4. use Shopware\Core\Framework\Bundle;
  5. use Shopware\Core\Framework\Log\Package;
  6. use Symfony\Component\Config\FileLocator;
  7. use Symfony\Component\DependencyInjection\Compiler\PassConfig;
  8. use Symfony\Component\DependencyInjection\ContainerBuilder;
  9. use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
  10. /**
  11.  * @internal
  12.  */
  13. #[Package('core')]
  14. class Content extends Bundle
  15. {
  16.     /**
  17.      * {@inheritdoc}
  18.      */
  19.     public function build(ContainerBuilder $container): void
  20.     {
  21.         parent::build($container);
  22.         $loader = new XmlFileLoader($container, new FileLocator(__DIR__ '/DependencyInjection/'));
  23.         $loader->load('category.xml');
  24.         $loader->load('media.xml');
  25.         $loader->load('product.xml');
  26.         $loader->load('newsletter_recipient.xml');
  27.         $loader->load('rule.xml');
  28.         $loader->load('product_stream.xml');
  29.         $loader->load('product_export.xml');
  30.         $loader->load('property.xml');
  31.         $loader->load('cms.xml');
  32.         $loader->load('mail_template.xml');
  33.         $loader->load('delivery_time.xml');
  34.         $loader->load('import_export.xml');
  35.         $loader->load('contact_form.xml');
  36.         $loader->load('sitemap.xml');
  37.         $loader->load('landing_page.xml');
  38.         $loader->load('flow.xml');
  39.         if ($container->getParameter('kernel.environment') === 'test') {
  40.             $loader->load('services_test.xml');
  41.         }
  42.         $container->addCompilerPass(new MailerConfigurationCompilerPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION0);
  43.     }
  44. }