You are here

function clients_connection_drupal_services_6_2::testConnectionConnect in Web Service Clients 7

Connection test button handler: basic connection.

Connection test handlers should return the raw data they got back from the connection for display to the user.

File

backends/clients_drupal/clients_drupal.inc, line 549
Defines methods and calls to Drupal services

Class

clients_connection_drupal_services_6_2
Drupal client for services on a Drupal 6 site for Services 6.x-2.x.

Code

function testConnectionConnect(&$button_form_values) {

  // Call the connect method.
  $connect = $this
    ->callMethod('system.connect');
  if (is_array($connect) && isset($connect['user'])) {
    drupal_set_message(t('Sucessfully connected to the remote site.'));
  }
  else {
    drupal_set_message(t('Could not connect to the remote site.'), 'warning');
  }
  return $connect;
}