Moving the ThemeContext to the shop bundle

This commit is contained in:
mamazu 2022-02-18 23:41:48 +01:00 committed by Grzegorz Sadowski
parent 539e099a8a
commit e0dd153067
No known key found for this signature in database
GPG key ID: EF87FF4E6E3BD364
5 changed files with 37 additions and 8 deletions

View file

@ -20,11 +20,6 @@
<argument type="service" id="request_stack" />
</service>
<service id="sylius.theme.context.channel_based" class="Sylius\Bundle\CoreBundle\Theme\ChannelBasedThemeContext" public="false">
<argument type="service" id="sylius.context.channel" />
<argument type="service" id="sylius.repository.theme" />
</service>
<service id="sylius.context.shopper" class="Sylius\Component\Core\Context\ShopperContext" lazy="true">
<argument type="service" id="sylius.context.channel" />
<argument type="service" id="sylius.context.currency" />

View file

@ -1,5 +1,16 @@
<?php
/*
* This file is part of the Sylius package.
*
* (c) Paweł Jędrzejewski
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Sylius\Bundle\ShopBundle\Form\Extension;
use Sylius\Bundle\ChannelBundle\Form\Type\ChannelType;
@ -7,7 +18,7 @@ use Symfony\Component\Form\AbstractTypeExtension;
use Symfony\Component\Form\FormBuilderInterface;
use Sylius\Bundle\ThemeBundle\Form\Type\ThemeNameChoiceType;
class ChannelTypeExtension extends AbstractTypeExtension
final class ChannelTypeExtension extends AbstractTypeExtension
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{

View file

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of the Sylius package.
(c) Paweł Jędrzejewski
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
-->
<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
<services>
<defaults public="true" />
<service id="sylius.theme.context.channel_based" class="Sylius\Bundle\ShopBundle\Theme\ChannelBasedThemeContext" public="false">
<argument type="service" id="sylius.context.channel" />
<argument type="service" id="sylius.repository.theme" />
</service>
</services>
</container>

View file

@ -11,7 +11,7 @@
declare(strict_types=1);
namespace Sylius\Bundle\CoreBundle\Theme;
namespace Sylius\Bundle\ShopBundle\Theme;
use Sylius\Bundle\ThemeBundle\Context\ThemeContextInterface;
use Sylius\Bundle\ThemeBundle\Model\ThemeInterface;

View file

@ -11,7 +11,7 @@
declare(strict_types=1);
namespace spec\Sylius\Bundle\CoreBundle\Theme;
namespace spec\Sylius\Bundle\ShopBundle\Theme;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;