crudification + corrections on thirdparty

This commit is contained in:
2021-10-04 18:25:49 +02:00
parent cc7e38194f
commit 05b9476a71
16 changed files with 313 additions and 212 deletions

View File

@@ -2,6 +2,9 @@
namespace Chill\ThirdPartyBundle\DependencyInjection;
use Chill\ThirdPartyBundle\Controller\ThirdPartyController;
use Chill\ThirdPartyBundle\Entity\ThirdParty;
use Chill\ThirdPartyBundle\Form\ThirdPartyType;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
@@ -37,6 +40,7 @@ class ChillThirdPartyExtension extends Extension implements PrependExtensionInte
$loader->load('services/menu.yaml');
$loader->load('services/fixtures.yaml');
$loader->load('services/serializer.yaml');
$loader->load('services/repository.yaml');
}
public function prepend(ContainerBuilder $container)
@@ -54,6 +58,25 @@ class ChillThirdPartyExtension extends Extension implements PrependExtensionInte
'@ChillThirdPartyBundle/config/routes.yaml'
)
],
'cruds' => [
[
'class' => ThirdParty::class,
'controller' => ThirdPartyController::class,
'name' => '3party_3party',
'base_path' => '/3party/3party',
'form_class' => ThirdPartyType::class,
'actions' => [
'index' => [
'template' => '@ChillThirdParty/ThirdParty/index.html.twig',
'role' => ThirdPartyVoter::SHOW,
],
'new' => [
'role' => ThirdPartyVoter::CREATE,
]
]
]
],
'apis' => [
[
'class' => \Chill\ThirdPartyBundle\Entity\ThirdParty::class,