public function Grant(Action $action, $onObject)
    {
        if ($onObject instanceof Page)
        {
            return $this->GrantOnPage($onObject);
        }
        if ($onObject instanceof Content)
        {
            return $this->GrantOnContent($onObject, $action);
        }
        else
        {
            throw new \LogicException('Frontend access check not implemented for type '. get_class($onObject));
        }
        return GrantResult::Allowed();
    }
public function Grant(Action $action, $onObject)
    {
        if ($onObject instanceof Page)
        {
            return $this->GrantOnPage($onObject);
        }
        if ($onObject instanceof Content)
        {
            return $this->GrantOnContent($onObject, $action);
        }
        else
        {
            throw new \LogicException('Frontend access check not implemented for type '. get_class($onObject));
        }
        return GrantResult::Allowed();
    }
public function Grant ( Action $ action , $ onObject ) { if ( $ onObject instanceof Page ) { return $ this -> GrantOnPage ( $ onObject ) ; } if ( $ onObject instanceof Content ) { return $ this -> GrantOnContent ( $ onObject , $ action ) ; } else { throw new \ LogicException ( 'Frontend access check not implemented for type ' . get_class ( $ onObject ) ) ; } return GrantResult :: Allowed ( ) ; }
Check access to an object in the frontend
@param Action $action The action taken on the object
@param mixed $onObject The object; page and contents are currently supported
@return GrantResult Returns the check result
Check access to an object in the frontend