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