|
|
@@ -2,6 +2,7 @@ |
|
|
|
|
|
|
|
namespace Lc\CaracoleBundle\Controller; |
|
|
|
|
|
|
|
use App\Entity\Section\Section; |
|
|
|
use Doctrine\Common\Collections\ArrayCollection; |
|
|
|
use Doctrine\ORM\EntityManagerInterface; |
|
|
|
use EasyCorp\Bundle\EasyAdminBundle\Collection\FieldCollection; |
|
|
@@ -59,6 +60,13 @@ trait AdminControllerTrait |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public function configureResponseParametersDisableShowIfNotSection(KeyValueStore $responseParameters, Section $section) |
|
|
|
{ |
|
|
|
if($this->getSectionCurrent() != $section) { |
|
|
|
$responseParameters->set('replace_content_with_message', "Vous devez vous rendre sur la section ". $section->getTitle().' pour afficher cette page'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public function createIndexRepositoryQuery( |
|
|
|
SearchDto $searchDto, |
|
|
|
EntityDto $entityDto, |