public function PushQueue::deleteItemByEntity in Salesforce Suite 5.0.x
Same name and namespace in other branches
- 8.4 modules/salesforce_push/src/PushQueue.php \Drupal\salesforce_push\PushQueue::deleteItemByEntity()
- 8.3 modules/salesforce_push/src/PushQueue.php \Drupal\salesforce_push\PushQueue::deleteItemByEntity()
For a given entity, delete its corresponding queue items.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity whose items should be deleted.
Throws
\Exception
File
- modules/
salesforce_push/ src/ PushQueue.php, line 586
Class
- PushQueue
- Salesforce push queue.
Namespace
Drupal\salesforce_pushCode
public function deleteItemByEntity(EntityInterface $entity) {
try {
$this->connection
->delete(static::TABLE_NAME)
->condition('entity_id', $entity
->id())
->condition('name', $this->name)
->execute();
} catch (\Exception $e) {
$this
->catchException($e);
}
}