location admin: add admin crud for location type

This commit is contained in:
nobohan
2021-10-21 16:30:37 +02:00
parent e06a98e70a
commit 92843677f9
7 changed files with 167 additions and 1 deletions

View File

@@ -20,6 +20,7 @@
namespace Chill\MainBundle\DependencyInjection;
use Chill\MainBundle\Controller\AddressApiController;
use Chill\MainBundle\Controller\LocationTypeController;
use Chill\MainBundle\Controller\UserController;
use Chill\MainBundle\Doctrine\DQL\STContains;
use Chill\MainBundle\Doctrine\DQL\StrictWordSimilarityOPS;
@@ -44,6 +45,8 @@ use Chill\MainBundle\Doctrine\DQL\Replace;
use Chill\MainBundle\Doctrine\ORM\Hydration\FlatHierarchyEntityHydrator;
use Chill\MainBundle\Doctrine\Type\NativeDateIntervalType;
use Chill\MainBundle\Doctrine\Type\PointType;
use Chill\MainBundle\Entity\LocationType;
use Chill\MainBundle\Form\LocationTypeType;
use Symfony\Component\HttpFoundation\Request;
/**
@@ -315,7 +318,29 @@ class ChillMainExtension extends Extension implements PrependExtensionInterface,
'template' => '@ChillMain/User/edit.html.twig'
]
]
]
],
[
'class' => LocationType::class,
'name' => 'main_location_type',
'base_path' => '/admin/main/location-type',
'base_role' => 'ROLE_ADMIN',
'form_class' => LocationTypeType::class,
'controller' => LocationTypeController::class,
'actions' => [
'index' => [
'role' => 'ROLE_ADMIN',
'template' => '@ChillMain/LocationType/index.html.twig',
],
'new' => [
'role' => 'ROLE_ADMIN',
'template' => '@ChillMain/LocationType/new.html.twig',
],
'edit' => [
'role' => 'ROLE_ADMIN',
'template' => '@ChillMain/LocationType/edit.html.twig',
]
]
],
],
'apis' => [
[