protected function checkSecurity($intention, $resource = null)
    {
        $securityMapping = $this->getSecurityMapping();

        return $this->container->get('security.authorization_checker')->isGranted(
            (array) (empty($securityMapping[$intention]) ?
                $intention :
                $securityMapping[$intention]
            ),
            $resource
        );
    }
protected function checkSecurity($intention, $resource = null)
    {
        $securityMapping = $this->getSecurityMapping();

        return $this->container->get('security.authorization_checker')->isGranted(
            (array) (empty($securityMapping[$intention]) ?
                $intention :
                $securityMapping[$intention]
            ),
            $resource
        );
    }
protected function checkSecurity ( $ intention , $ resource = null ) { $ securityMapping = $ this -> getSecurityMapping ( ) ; return $ this -> container -> get ( 'security.authorization_checker' ) -> isGranted ( ( array ) ( empty ( $ securityMapping [ $ intention ] ) ? $ intention : $ securityMapping [ $ intention ] ) , $ resource ) ; }
checks security for given intention

@param string $intention
@param mixed  $resource

@return boolean
checks security for given intention