function hook_services_client_skip_autosync in Services Client 7.2
This hook allows to prevent syncing entity by automatic services_client event handling.
Parameters
EventHandler $handler: Handler class that provides sending object.
stdClass $entity: Local entity object that should be processed.
string $entity_type: Entity type name.
Return value
bool TRUE if entity shouldn't be automatically synced to remote site.
2 functions implement hook_services_client_skip_autosync()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- services_client_services_client_skip_autosync in ./
services_client.module - Implements hook_services_client_skip_autosync().
- services_client_test_services_client_skip_autosync in tests/
services_client_test/ services_client_test.module - Implements hook_services_client_skip_autosync().
1 invocation of hook_services_client_skip_autosync()
- EventHandler::skipAutosync in include/
event.inc - Return TRUE if this entity shouldn't be send automatically to all connections.
File
- ./
services_client.api.php, line 175 - Services client allows you to push different objects from local drupal installation to remote servers via REST api.
Code
function hook_services_client_skip_autosync($handler, $entity, $entity_type) {
// This would prevent syncing uid 1 account by default.
if ($entity_type == 'user' && $entity->uid == 1) {
return TRUE;
}
}