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

@@ -37,13 +37,13 @@ class MenuBuilder implements LocalMenuBuilderInterface
* @var AuthorizationCheckerInterface
*/
protected $authorizationChecker;
/**
*
* @var TranslatorInterface
*/
protected $translator;
public function __construct(
AuthorizationCheckerInterface $authorizationChecker,
TranslatorInterface $translator
@@ -52,15 +52,15 @@ class MenuBuilder implements LocalMenuBuilderInterface
$this->translator = $translator;
}
public function buildMenu($menuId, MenuItem $menu, array $parameters)
{
if ($this->authorizationChecker->isGranted(ThirdPartyVoter::SHOW)) {
$menu
->addChild(
$this->translator->trans('Third parties'),
$this->translator->trans('Third parties'),
[
'route' => 'chill_3party_3party_index',
'route' => 'chill_crud_3party_3party_index',
])
->setExtras([
'order' => 112