public static function delete_endpoint($id) {
        require_capability('moodle/site:config', context_system::instance());
        $endpoint = new endpoint($id);

        // Will throw exceptions on validation failures.
        return $endpoint->delete();
    }
public static function delete_endpoint($id) {
        require_capability('moodle/site:config', context_system::instance());
        $endpoint = new endpoint($id);

        // Will throw exceptions on validation failures.
        return $endpoint->delete();
    }
public static function delete_endpoint ( $ id ) { require_capability ( 'moodle/site:config' , context_system :: instance ( ) ) ; $ endpoint = new endpoint ( $ id ) ; // Will throw exceptions on validation failures. return $ endpoint -> delete ( ) ; }
Delete an endpoint.

Requires moodle/site:config capability at the system context.

@param int $id The id of the endpoint to delete.
@return boolean
Delete an endpoint .