admin: add ThirdParty admin

This commit is contained in:
nobohan
2022-05-06 15:51:29 +02:00
parent a4f2d47c46
commit 7cefce8305
9 changed files with 216 additions and 2 deletions

View File

@@ -11,8 +11,11 @@ declare(strict_types=1);
namespace Chill\ThirdPartyBundle\DependencyInjection;
use Chill\ThirdPartyBundle\Controller\ThirdPartyCategoryController;
use Chill\ThirdPartyBundle\Controller\ThirdPartyController;
use Chill\ThirdPartyBundle\Entity\ThirdParty;
use Chill\ThirdPartyBundle\Entity\ThirdPartyCategory;
use Chill\ThirdPartyBundle\Form\ThirdPartyCategoryType;
use Chill\ThirdPartyBundle\Form\ThirdPartyType;
use Chill\ThirdPartyBundle\Security\Voter\ThirdPartyVoter;
use Symfony\Component\Config\FileLocator;
@@ -100,6 +103,27 @@ class ChillThirdPartyExtension extends Extension implements PrependExtensionInte
],
],
],
[
'class' => ThirdPartyCategory::class,
'name' => 'thirdparty_thirdparty-category',
'base_path' => '/admin/thirdparty/thirdparty-category',
'form_class' => ThirdPartyCategoryType::class,
'controller' => ThirdPartyCategoryController::class,
'actions' => [
'index' => [
'role' => 'ROLE_ADMIN',
'template' => '@ChillThirdParty/ThirdPartyCategory/index.html.twig',
],
'new' => [
'role' => 'ROLE_ADMIN',
'template' => '@ChillThirdParty/ThirdPartyCategory/new.html.twig',
],
'edit' => [
'role' => 'ROLE_ADMIN',
'template' => '@ChillThirdParty/ThirdPartyCategory/edit.html.twig',
],
],
],
],
'apis' => [
[