protected function authorize(string $action, string $resourceType = null, $resourceIdentity = null)
    {
        /** @var AuthorizationManagerInterface $manager */
        $manager = $this->getContainer()->get(AuthorizationManagerInterface::class);
        $manager->authorize($action, $resourceType, $resourceIdentity);
    }
protected function authorize(string $action, string $resourceType = null, $resourceIdentity = null)
    {
        /** @var AuthorizationManagerInterface $manager */
        $manager = $this->getContainer()->get(AuthorizationManagerInterface::class);
        $manager->authorize($action, $resourceType, $resourceIdentity);
    }
protected function authorize ( string $ action , string $ resourceType = null , $ resourceIdentity = null ) { /** @var AuthorizationManagerInterface $manager */ $ manager = $ this -> getContainer ( ) -> get ( AuthorizationManagerInterface :: class ) ; $ manager -> authorize ( $ action , $ resourceType , $ resourceIdentity ) ; }
Authorize action for current user.

@param string          $action
@param string|null     $resourceType
@param string|int|null $resourceIdentity

@return void

@throws AuthorizationExceptionInterface
@throws ContainerExceptionInterface
@throws NotFoundExceptionInterface
Authorize action for current user .