public function checkSecurity($rol,$parameters = null) {
        if($rol === null){
            throw $this->createAccessDeniedHttpException($this->trans($this->genericMessage));
        }
        $roles = $rol;
        if(!is_array($rol)){
            $roles = array($rol);
        }
        $valid = $this->getSecurityContext()->isGranted($roles,$parameters);
        foreach ($roles as $rol) {
            if(!$valid){
                throw $this->createAccessDeniedHttpException($this->buildMessage($rol));
            }
            $methodValidMap = $this->getMethodValidMap();
            if(isset($methodValidMap[$rol])){
                $method = $methodValidMap[$rol];
                $valid = call_user_func_array(array($this,$method),array($rol,$parameters));
            }
        }
    }
public function checkSecurity($rol,$parameters = null) {
        if($rol === null){
            throw $this->createAccessDeniedHttpException($this->trans($this->genericMessage));
        }
        $roles = $rol;
        if(!is_array($rol)){
            $roles = array($rol);
        }
        $valid = $this->getSecurityContext()->isGranted($roles,$parameters);
        foreach ($roles as $rol) {
            if(!$valid){
                throw $this->createAccessDeniedHttpException($this->buildMessage($rol));
            }
            $methodValidMap = $this->getMethodValidMap();
            if(isset($methodValidMap[$rol])){
                $method = $methodValidMap[$rol];
                $valid = call_user_func_array(array($this,$method),array($rol,$parameters));
            }
        }
    }
public function checkSecurity ( $ rol , $ parameters = null ) { if ( $ rol === null ) { throw $ this -> createAccessDeniedHttpException ( $ this -> trans ( $ this -> genericMessage ) ) ; } $ roles = $ rol ; if ( ! is_array ( $ rol ) ) { $ roles = array ( $ rol ) ; } $ valid = $ this -> getSecurityContext ( ) -> isGranted ( $ roles , $ parameters ) ; foreach ( $ roles as $ rol ) { if ( ! $ valid ) { throw $ this -> createAccessDeniedHttpException ( $ this -> buildMessage ( $ rol ) ) ; } $ methodValidMap = $ this -> getMethodValidMap ( ) ; if ( isset ( $ methodValidMap [ $ rol ] ) ) { $ method = $ methodValidMap [ $ rol ] ; $ valid = call_user_func_array ( array ( $ this , $ method ) , array ( $ rol , $ parameters ) ) ; } } }
Evalua que el usuario tenga acceso a la seccion especifica, ademas se valida con un segundo metodo
@param type $rol
@param type $parameters
@throws type
Evalua que el usuario tenga acceso a la seccion especifica ademas se valida con un segundo metodo