Symfony\Bundle\FrameworkBundle\Controller\Controller::isGranted PHP Method

isGranted() protected method

Checks if the attributes are granted against the current authentication token and optionally supplied object.
protected isGranted ( mixed $attributes, mixed $object = null ) : boolean
$attributes mixed The attributes
$object mixed The object
return boolean
    protected function isGranted($attributes, $object = null)
    {
        if (!$this->container->has('security.authorization_checker')) {
            throw new \LogicException('The SecurityBundle is not registered in your application.');
        }
        return $this->container->get('security.authorization_checker')->isGranted($attributes, $object);
    }

Usage Example

Ejemplo n.º 1
0
 public function isGranted($attributes, $object = null)
 {
     return parent::isGranted($attributes, $object);
 }
All Usage Examples Of Symfony\Bundle\FrameworkBundle\Controller\Controller::isGranted