mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 17:10:53 +00:00
[AdminBundle] Add base form type for ShopUserType and PromotionCouponGeneratorInstructionType (#17337)
| Q | A |-----------------|----- | Branch? | 1.14 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Related tickets | #17336 | License | MIT
This commit is contained in:
commit
146b1026fd
3 changed files with 68 additions and 0 deletions
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Sylius package.
|
||||
*
|
||||
* (c) Sylius Sp. z o.o.
|
||||
*
|
||||
* 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\AdminBundle\Form\Type;
|
||||
|
||||
use Sylius\Bundle\PromotionBundle\Form\Type\PromotionCouponGeneratorInstructionType as BasePromotionCouponGeneratorInstructionType;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
|
||||
final class PromotionCouponGeneratorInstructionType extends AbstractType
|
||||
{
|
||||
public function getBlockPrefix(): string
|
||||
{
|
||||
return 'sylius_admin_promotion_coupon_generator_instruction';
|
||||
}
|
||||
|
||||
public function getParent(): string
|
||||
{
|
||||
return BasePromotionCouponGeneratorInstructionType::class;
|
||||
}
|
||||
}
|
||||
30
src/Sylius/Bundle/AdminBundle/Form/Type/ShopUserType.php
Normal file
30
src/Sylius/Bundle/AdminBundle/Form/Type/ShopUserType.php
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Sylius package.
|
||||
*
|
||||
* (c) Sylius Sp. z o.o.
|
||||
*
|
||||
* 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\AdminBundle\Form\Type;
|
||||
|
||||
use Sylius\Bundle\CoreBundle\Form\Type\User\ShopUserType as BaseShopUserType;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
|
||||
final class ShopUserType extends AbstractType
|
||||
{
|
||||
public function getBlockPrefix(): string
|
||||
{
|
||||
return 'sylius_admin_shop_user';
|
||||
}
|
||||
|
||||
public function getParent(): string
|
||||
{
|
||||
return BaseShopUserType::class;
|
||||
}
|
||||
}
|
||||
|
|
@ -150,6 +150,10 @@
|
|||
<tag name="form.type" />
|
||||
</service>
|
||||
|
||||
<service id="sylius_admin.form.type.promotion_coupon_generator_instruction" class="Sylius\Bundle\AdminBundle\Form\Type\PromotionCouponGeneratorInstructionType" >
|
||||
<tag name="form.type" />
|
||||
</service>
|
||||
|
||||
<service id="sylius_admin.form.type.shipping_category" class="Sylius\Bundle\AdminBundle\Form\Type\ShippingCategoryType" >
|
||||
<tag name="form.type" />
|
||||
</service>
|
||||
|
|
@ -162,6 +166,10 @@
|
|||
<tag name="form.type" />
|
||||
</service>
|
||||
|
||||
<service id="sylius_admin.form.type.shop_user" class="Sylius\Bundle\AdminBundle\Form\Type\ShopUserType" >
|
||||
<tag name="form.type" />
|
||||
</service>
|
||||
|
||||
<service id="sylius_admin.form.type.tax_category" class="Sylius\Bundle\AdminBundle\Form\Type\TaxCategoryType" >
|
||||
<tag name="form.type" />
|
||||
</service>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue