mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
This commit is contained in:
parent
1cf0e51e9a
commit
0a89b5fc26
@ -20,20 +20,20 @@
|
||||
|
||||
namespace Chill\MainBundle\CRUD\Controller;
|
||||
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
use Chill\MainBundle\Pagination\PaginatorFactory;
|
||||
use Symfony\Component\Form\FormInterface;
|
||||
use Symfony\Component\Translation\TranslatorInterface;
|
||||
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||
use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
|
||||
use Symfony\Component\Security\Core\Role\Role;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Chill\MainBundle\CRUD\Resolver\Resolver;
|
||||
use Chill\MainBundle\Pagination\PaginatorInterface;
|
||||
use Chill\MainBundle\CRUD\Form\CRUDDeleteEntityForm;
|
||||
use Chill\MainBundle\Pagination\PaginatorFactory;
|
||||
use Chill\MainBundle\Pagination\PaginatorInterface;
|
||||
use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
|
||||
|
||||
/**
|
||||
* Class CRUDController
|
||||
@ -42,6 +42,7 @@ use Chill\MainBundle\CRUD\Form\CRUDDeleteEntityForm;
|
||||
*/
|
||||
class CRUDController extends AbstractController
|
||||
{
|
||||
|
||||
/**
|
||||
* The crud configuration
|
||||
*
|
||||
@ -239,6 +240,10 @@ class CRUDController extends AbstractController
|
||||
return $response;
|
||||
}
|
||||
|
||||
if (!isset($entity)) {
|
||||
$entity = '';
|
||||
}
|
||||
|
||||
$response = $this->onPostCheckACL($action, $request, $entity);
|
||||
if ($response instanceof Response) {
|
||||
return $response;
|
||||
@ -1101,6 +1106,8 @@ class CRUDController extends AbstractController
|
||||
}
|
||||
|
||||
/**
|
||||
* Include services
|
||||
*
|
||||
* @param string $action
|
||||
* @return mixed
|
||||
*/
|
||||
@ -1114,7 +1121,7 @@ class CRUDController extends AbstractController
|
||||
*/
|
||||
protected function getPaginatorFactory(): PaginatorFactory
|
||||
{
|
||||
return $this->get(PaginatorFactory::class);
|
||||
return $this->container->get('chill_main.paginator_factory');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1164,7 +1171,7 @@ class CRUDController extends AbstractController
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public static function getSubscribedServices()
|
||||
public static function getSubscribedServices(): array
|
||||
{
|
||||
return \array_merge(
|
||||
parent::getSubscribedServices(),
|
||||
|
@ -1,6 +1,7 @@
|
||||
services:
|
||||
chill_main.paginator_factory:
|
||||
class: Chill\MainBundle\Pagination\PaginatorFactory
|
||||
public: true
|
||||
arguments:
|
||||
- "@request_stack"
|
||||
- "@router"
|
||||
|
Loading…
x
Reference in New Issue
Block a user