-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathStorefront.php
43 lines (37 loc) · 1.4 KB
/
Storefront.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php declare(strict_types=1);
namespace Shopware\Storefront;
use Shopware\Core\Framework\Bundle;
use Shopware\Core\Framework\Feature;
use Shopware\Core\Framework\Log\Package;
use Shopware\Storefront\DependencyInjection\DisableTemplateCachePass;
use Shopware\Storefront\DependencyInjection\StorefrontMigrationReplacementCompilerPass;
use Shopware\Storefront\Framework\ThemeInterface;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
/**
* @internal
*/
#[Package('storefront')]
class Storefront extends Bundle implements ThemeInterface
{
/**
* {@inheritdoc}
*/
public function build(ContainerBuilder $container): void
{
parent::build($container);
$this->buildDefaultConfig($container);
$loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/DependencyInjection'));
$loader->load('services.xml');
$loader->load('seo.xml');
$loader->load('controller.xml');
$loader->load('theme.xml');
if (!Feature::isActive('v6.7.0.0')) {
$loader->load('theme_6_6_0.xml');
}
$container->setParameter('storefrontRoot', $this->getPath());
$container->addCompilerPass(new DisableTemplateCachePass());
$container->addCompilerPass(new StorefrontMigrationReplacementCompilerPass());
}
}