function services_client_get_existing_hooks in Services Client 7
Get one or all custom overridden pages.
Parameters
$hook_id: The name of the task.
2 calls to services_client_get_existing_hooks()
- services_client_data_process in ./
services_client.module - This function takes inbound data objects and a type and determines if there are tasks for them. If there are, it checks conditions and then generates connections and organizes the data to pass to the calling functions
- services_client_error_retry in services_client_error/
services_client_error.module - Retry and execute error
File
- ./
services_client.module, line 74 - 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_get_existing_hooks($hook_id = NULL) {
ctools_include('export');
if ($hook_id) {
$hooks = ctools_export_crud_load('services_client_connection_hook', $hook_id);
}
else {
$hooks = ctools_export_crud_load_all('services_client_connection_hook');
}
// Ctools variable - see our schema definition for this naming
$hooks_disabled = variable_get('default_services_client_connection_hook', array());
$conns_disabled = variable_get('default_services_client_connection', array());
foreach ($hooks as $hook_name => $hook_info) {
// if the hook is disabled, remove it from our active hooks
if (!empty($hooks_disabled[$hook_name])) {
unset($hooks[$hook_name]);
}
// if the connection is disabled, remove it from our active hooks
if (!empty($conns_disabled[$hook_info->conn_name])) {
unset($hooks[$hook_name]);
}
}
return $hooks;
}