mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 17:10:53 +00:00
Moving the ThemeContext to the shop bundle
This commit is contained in:
parent
539e099a8a
commit
e0dd153067
5 changed files with 37 additions and 8 deletions
|
|
@ -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" />
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -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;
|
||||
|
|
@ -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;
|
||||
Loading…
Add table
Reference in a new issue