function clients_connection_drupal_services_6_2::testConnectionNodeLoad in Web Service Clients 7
Same name and namespace in other branches
- 6.2 connections/clients_drupal/clients_drupal.inc \clients_connection_drupal_services_6_2::testConnectionNodeLoad()
- 7.2 connections/clients_drupal/clients_drupal.inc \clients_connection_drupal_services_6_2::testConnectionNodeLoad()
Connection test button handler: loading a node.
1 method overrides clients_connection_drupal_services_6_2::testConnectionNodeLoad()
- clients_connection_drupal_services_5::testConnectionNodeLoad in backends/
clients_drupal/ clients_drupal.inc - Connection test button handler: loading a node.
File
- backends/
clients_drupal/ clients_drupal.inc, line 596 - 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 testConnectionNodeLoad(&$button_form_values) {
// Must be cast to integer for faffiness of XMLRPC and Services.
$nid = (int) $button_form_values['nid'];
$fields = array();
$node = $this
->callMethod('node.get', $nid, $fields);
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;
}