protected function EventHandler::enqueueEntity in Services Client 7.2
Put current entity to queue.
Return value
bool TRUE if item was created.
1 call to EventHandler::enqueueEntity()
- EventHandler::enqueue in include/
event.inc - Enqueue item if should be queue.
File
- include/
event.inc, line 786
Class
- EventHandler
- Event handler plugin.
Code
protected function enqueueEntity() {
$data = array(
'version' => 2,
'entity' => $this
->getEntity(),
'event' => $this
->getEvent()->name,
);
// Get queue
$queue = DrupalQueue::get('services_client_sync', TRUE);
// Enqueue data
return $queue
->createItem($data);
}