You are here

function clients_connection_drupal_services_5::testConnectionNodeLoad in Web Service Clients 7

Same name and namespace in other branches
  1. 6.2 connections/clients_drupal/clients_drupal.inc \clients_connection_drupal_services_5::testConnectionNodeLoad()
  2. 7.2 connections/clients_drupal/clients_drupal.inc \clients_connection_drupal_services_5::testConnectionNodeLoad()

Connection test button handler: loading a node.

This uses a different method on Services 5.x-0.92.

Overrides clients_connection_drupal_services_6_2::testConnectionNodeLoad

File

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

Class

clients_connection_drupal_services_5
Drupal client for services on a Drupal 5 site.

Code

function testConnectionNodeLoad(&$button_form_values) {
  $nid = $button_form_values['nid'];
  $node = $this
    ->callMethod('node.load', $nid);
  if (is_array($node) && isset($node['nid'])) {
    drupal_set_message(t('Sucessfully retrieved node %title (nid @nid).', array(
      '%title' => $node['title'],
      '@nid' => $node['nid'],
    )));
  }
  else {
    drupal_set_message(t('Could not retrieve a node from the remote site.'), 'warning');
  }
  return $node;
}