protected function denyAccessUnlessGranted($attributes, $subject = null, string $message = 'Access Denied.')
    {
        if (!$this->isGranted($attributes, $subject)) {
            $exception = $this->createAccessDeniedException($message);
            $exception->setAttributes($attributes);
            $exception->setSubject($subject);

            throw $exception;
        }
    }
protected function denyAccessUnlessGranted($attributes, $subject = null, string $message = 'Access Denied.')
    {
        if (!$this->isGranted($attributes, $subject)) {
            $exception = $this->createAccessDeniedException($message);
            $exception->setAttributes($attributes);
            $exception->setSubject($subject);

            throw $exception;
        }
    }
protected function denyAccessUnlessGranted ( $ attributes , $ subject = null , string $ message = 'Access Denied.' ) { if ( ! $ this -> isGranted ( $ attributes , $ subject ) ) { $ exception = $ this -> createAccessDeniedException ( $ message ) ; $ exception -> setAttributes ( $ attributes ) ; $ exception -> setSubject ( $ subject ) ; throw $ exception ; } }
Throws an exception unless the attributes are granted against the current authentication token and optionally
supplied subject.

@throws AccessDeniedException

@final
Throws an exception unless the attributes are granted against the current authentication token and optionally supplied subject .