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.

GroupUserAdminController.php 940B

пре 3 година
пре 3 година
пре 3 година
пре 3 година
пре 3 година
пре 3 година
12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace Lc\SovBundle\Controller\User;
  3. use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
  4. use Lc\SovBundle\Container\User\GroupUserContainer;
  5. use Lc\SovBundle\Controller\AbstractAdminController;
  6. use Lc\SovBundle\Field\StatusField;
  7. use Lc\SovBundle\Repository\RepositoryQueryInterface;
  8. abstract class GroupUserAdminController extends AbstractAdminController
  9. {
  10. public function getRepositoryQuery(): RepositoryQueryInterface
  11. {
  12. return $this->get(GroupUserContainer::class)->getRepositoryQuery();
  13. }
  14. public function configureFields(string $pageName): iterable
  15. {
  16. return [
  17. TextField::new('title')->setSortable(true),
  18. TextField::new('devAlias')->hideOnIndex(),
  19. StatusField::new('status')->setSortable(true),
  20. ];
  21. }
  22. public function createEntity(string $entityFqcn)
  23. {
  24. return $this->getGroupUserContainer()->getFactory()->create();
  25. }
  26. }