You are here

function services_client_services_connection_hook_exists in Services Client 7

Returns TRUE if hook_name alredy exists for specific connection.

Return value

bool

1 string reference to 'services_client_services_connection_hook_exists'
services_client_ctools_export_ui_form in plugins/export_ui/services_client.inc
Define the preset add/edit form.

File

./services_client.module, line 246
Services client module allows to push different types of objects on different types of events such as node_save, user_save to remote masters.

Code

function services_client_services_connection_hook_exists($name, $element) {
  $conn_name = $element['#machine_name']['conn_name'];
  $query = 'SELECT 1 FROM {services_client_connection_hook} WHERE conn_name = :conn_name AND name = :name';
  $result = db_query_range($query, 0, 1, array(
    'conn_name' => $conn_name,
    'name' => $name,
  ))
    ->fetchField();
  return $result;
}