public function getSiteRole($nb_site_role)
    {
        if (is_numeric($nb_role_id = nb_getMixedValue($nb_site_role, NABU_ROLE_FIELD_ID))) {
            $retval = $this->getSiteRoles()->getItem($nb_role_id);
        } else {
            $retval = false;
        }

        return $retval;
    }
public function getSiteRole($nb_site_role)
    {
        if (is_numeric($nb_role_id = nb_getMixedValue($nb_site_role, NABU_ROLE_FIELD_ID))) {
            $retval = $this->getSiteRoles()->getItem($nb_role_id);
        } else {
            $retval = false;
        }

        return $retval;
    }
public function getSiteRole ( $ nb_site_role ) { if ( is_numeric ( $ nb_role_id = nb_getMixedValue ( $ nb_site_role , NABU_ROLE_FIELD_ID ) ) ) { $ retval = $ this -> getSiteRoles ( ) -> getItem ( $ nb_role_id ) ; } else { $ retval = false ; } return $ retval ; }
Gets a Site Role by his Id.
@param mixed $nb_site_role A CNabuDataObject containing a field named nb_role_id or a valid Id.
@return CNabuSiteRole|bool Returns the Site Role instance if exists or false if not.
Gets a Site Role by his Id .