namespace App\Controller\Config; | namespace App\Controller\Config; | ||||
use App\Entity\Config\TaxRate; | use App\Entity\Config\TaxRate; | ||||
use EasyCorp\Bundle\EasyAdminBundle\Field\NumberField; | |||||
use EasyCorp\Bundle\EasyAdminBundle\Field\TextField; | |||||
use Lc\CaracoleBundle\Controller\Config\TaxRateAdminController as CaracTaxRateAdminController; | use Lc\CaracoleBundle\Controller\Config\TaxRateAdminController as CaracTaxRateAdminController; | ||||
class TaxRateAdminController extends CaracTaxRateAdminController | class TaxRateAdminController extends CaracTaxRateAdminController | ||||
{ | { | ||||
public static function getEntityFqcn(): string | public static function getEntityFqcn(): string | ||||
{ | { | ||||
return TaxRate::class; | return TaxRate::class; | ||||
} | } | ||||
public function configureFields(string $pageName): iterable | |||||
{ | |||||
return [ | |||||
TextField::new('title')->setLabel('Titre'), | |||||
NumberField::new('value')->setLabel('Valeur'), | |||||
]; | |||||
} | |||||
} | } |
<?php | |||||
namespace App\Controller\Config; | |||||
use App\Entity\Config\Unit; | |||||
use Lc\CaracoleBundle\Controller\Config\UnitAdminController as CaracUnitAdminController; | |||||
class UnitAdminController extends CaracUnitAdminController | |||||
{ | |||||
public static function getEntityFqcn(): string | |||||
{ | |||||
return Unit::class; | |||||
} | |||||
} |
namespace App\Controller\Dashboard; | namespace App\Controller\Dashboard; | ||||
use App\Entity\Config\TaxRate; | use App\Entity\Config\TaxRate; | ||||
use App\Entity\Config\Unit; | |||||
use App\Entity\Merchant\Merchant; | use App\Entity\Merchant\Merchant; | ||||
use App\Entity\Section\Section; | use App\Entity\Section\Section; | ||||
use App\Entity\Site\Page; | use App\Entity\Site\Page; | ||||
MenuItem::linkToCrud('admin_merchant', '', Merchant::class), | MenuItem::linkToCrud('admin_merchant', '', Merchant::class), | ||||
MenuItem::linkToCrud('admin_section', '', Section::class), | MenuItem::linkToCrud('admin_section', '', Section::class), | ||||
MenuItem::linkToCrud('admin_tva', '', TaxRate::class), | MenuItem::linkToCrud('admin_tva', '', TaxRate::class), | ||||
MenuItem::linkToCrud('admin_unit', '', Unit::class), | |||||
] | ] | ||||
); | ); | ||||