function services_client_connection_save in Services Client 7
Same name and namespace in other branches
- 7.2 services_client_connection/services_client_connection.module \services_client_connection_save()
Save services client connection configuration
Parameters
$connection: Connnection configruation object
1 call to services_client_connection_save()
- services_client_oauth_access_callback in services_client_connection/
modules/ services_client_oauth/ services_client_oauth.module - Request callback to process and store access token
1 string reference to 'services_client_connection_save'
- services_client_connection_schema in services_client_connection/
services_client_connection.install - Implementation of hook_schema().
File
- services_client_connection/
services_client_connection.module, line 233 - Services Client Connection allows to configure different connections via UI and store them as exportable configuration. API client should be able to communicate with different versions of remote Services module via unified API client.
Code
function services_client_connection_save($connection) {
ctools_include('export');
$update = isset($connection->cid) && is_numeric($connection->cid) ? array(
'cid',
) : array();
$result = drupal_write_record('services_client_connection', $connection, $update);
services_client_connection_invoke($connection, 'save');
return $result;
}