You are here

function services_client_event_load_active in Services Client 7.2

Load all active services client events.

Parameters

string $event: Event type - 'save', 'delete'.

string $entity_type: Entity type name.

Return value

array Loaded events matching condition and active.

1 call to services_client_event_load_active()
services_client_process_events in ./services_client.module
Process entity by trigerring all events that are enabled and are matching conditions.

File

./services_client.module, line 308

Code

function services_client_event_load_active($event, $entity_type) {

  // Load events with ctools export, filter disbled.
  ctools_include('export');
  $events = array_filter(ctools_export_crud_load_all('services_client_connection_event'), function ($item) use ($event, $entity_type) {
    return empty($item->disabled) && $item->event == $event && $item->entity_type == $entity_type;
  });
  return $events;
}