src/Symfony/Bundle/FrameworkBundle/Controller/ControllerTrait.php
/**
     * Checks if the attributes are granted against the current authentication token and optionally supplied subject.
     *
     * @throws \LogicException
     *
     * @final
     */
Checks if the attributes are granted against the current authentication token and optionally supplied subject.

@final
Checks if the attributes are granted against the current authentication token and optionally supplied subject . @final
protected function isGranted($attributes, $subject = null): bool
    {
        if (!$this->container->has('security.authorization_checker')) {
            throw new \LogicException('The SecurityBundle is not registered in your application. Try running "composer require symfony/security-bundle".');
        }
        return $this->container->get('security.authorization_checker')->isGranted($attributes, $subject);
    }
protected function isGranted ( $ attributes , $ subject = null ) : bool { if ( ! $ this -> container -> has ( 'security.authorization_checker' ) ) { throw new \ LogicException ( 'The SecurityBundle is not registered in your application. Try running "composer require symfony/security-bundle".' ) ; } return $ this -> container -> get ( 'security.authorization_checker' ) -> isGranted ( $ attributes , $ subject ) ; }
Checks if the attributes are granted against the current authentication token and optionally supplied subject.
Checks if the attributes are granted against the current authentication token and optionally supplied subject .