You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

TaxRateAdminController.php 994B

3 yıl önce
3 yıl önce
3 yıl önce
3 yıl önce
3 yıl önce
3 yıl önce
3 yıl önce
3 yıl önce
1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace Lc\CaracoleBundle\Controller\Config;
  3. use EasyCorp\Bundle\EasyAdminBundle\Config\Crud;
  4. use EasyCorp\Bundle\EasyAdminBundle\Field\IntegerField;
  5. use EasyCorp\Bundle\EasyAdminBundle\Field\NumberField;
  6. use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
  7. use Lc\CaracoleBundle\Controller\AdminControllerTrait;
  8. use Lc\CaracoleBundle\Factory\Config\TaxRateFactory;
  9. use Lc\SovBundle\Controller\AbstractAdminController;
  10. abstract class TaxRateAdminController extends AbstractAdminController
  11. {
  12. use AdminControllerTrait;
  13. public function configureFields(string $pageName): iterable
  14. {
  15. return [
  16. TextField::new('title'),
  17. NumberField::new('value')
  18. ];
  19. }
  20. public function configureCrud(Crud $crud): Crud
  21. {
  22. return $crud->setSearchFields(['id', 'title', 'value']);
  23. }
  24. public function createEntity(string $entityFqcn)
  25. {
  26. $factory = new TaxRateFactory();
  27. return $factory->create();
  28. }
  29. }