<?php | |||||
namespace Lc\CaracoleBundle\Controller\Reduction; | |||||
use EasyCorp\Bundle\EasyAdminBundle\Field\ChoiceField; | |||||
use EasyCorp\Bundle\EasyAdminBundle\Field\NumberField; | |||||
use EasyCorp\Bundle\EasyAdminBundle\Field\TextField; | |||||
use Lc\CaracoleBundle\Controller\AdminControllerTrait; | |||||
use Lc\CaracoleBundle\Model\Config\TaxRateModel; | |||||
use Lc\CaracoleBundle\Model\Config\UnitModel; | |||||
use Lc\SovBundle\Controller\AbstractAdminController; | |||||
use Lc\SovBundle\Translation\TranslatorAdmin; | |||||
abstract class ReductionCartAdminController extends AbstractAdminController | |||||
{ | |||||
use AdminControllerTrait; | |||||
} |
<?php | |||||
namespace Lc\CaracoleBundle\Controller\Reduction; | |||||
use EasyCorp\Bundle\EasyAdminBundle\Field\ChoiceField; | |||||
use EasyCorp\Bundle\EasyAdminBundle\Field\NumberField; | |||||
use EasyCorp\Bundle\EasyAdminBundle\Field\TextField; | |||||
use Lc\CaracoleBundle\Controller\AdminControllerTrait; | |||||
use Lc\CaracoleBundle\Model\Config\TaxRateModel; | |||||
use Lc\CaracoleBundle\Model\Config\UnitModel; | |||||
use Lc\SovBundle\Controller\AbstractAdminController; | |||||
use Lc\SovBundle\Translation\TranslatorAdmin; | |||||
abstract class ReductionCatalogAdminController extends AbstractAdminController | |||||
{ | |||||
use AdminControllerTrait; | |||||
} |
FilterSectionInterface, | FilterSectionInterface, | ||||
OrderAmountMinInterface, StatusInterface | OrderAmountMinInterface, StatusInterface | ||||
{ | { | ||||
const APPLIED_TO_DELIVERY = 'delivery'; | |||||
const APPLIED_TO_ORDER_PRODUCTS = 'order-products'; | |||||
use StatusTrait; | use StatusTrait; | ||||
use OrderAmountMinTrait; | use OrderAmountMinTrait; | ||||
use ReductionTrait; | use ReductionTrait; | ||||
ReductionPropertyTrait::__construct as private __reductionPropertyConstruct; | ReductionPropertyTrait::__construct as private __reductionPropertyConstruct; | ||||
} | } | ||||
const APPLIED_TO_DELIVERY = 'delivery'; | |||||
const APPLIED_TO_ORDER_PRODUCTS = 'order-products'; | |||||
public function getAppliedToChoices() | |||||
{ | |||||
return [ | |||||
self::APPLIED_TO_DELIVERY, | |||||
self::APPLIED_TO_ORDER_PRODUCTS, | |||||
]; | |||||
} | |||||
/** | /** | ||||
* @ORM\Column(type="string", length=255) | * @ORM\Column(type="string", length=255) | ||||
*/ | */ |
new TwigFunction('carac_reminders', [$this, 'getReminders']), | new TwigFunction('carac_reminders', [$this, 'getReminders']), | ||||
new TwigFunction('carac_units', [$this, 'getUnits']), | new TwigFunction('carac_units', [$this, 'getUnits']), | ||||
new TwigFunction('carac_tax_rates', [$this, 'getTaxRates']), | new TwigFunction('carac_tax_rates', [$this, 'getTaxRates']), | ||||
new TwigFunction('carac_reduction_cart_codes', [$this, 'getTaxRates']), | |||||
); | ); | ||||
} | } | ||||
return $this->taxRateStore->setMerchant($this->merchantResolver->getCurrent())->getAsArray(); | return $this->taxRateStore->setMerchant($this->merchantResolver->getCurrent())->getAsArray(); | ||||
} | } | ||||
public function getReductionCartCodes() | |||||
{ | |||||
//TODO mettre à jour une fois les repo fait | |||||
return array(); | |||||
} | |||||
} | } |