Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / chi-teck / drupal-code-generator / templates / d8 / hook / entity_delete.twig
index e8f3ddfe7ecd9c0dd5040d038a38c85dfa5a5749..f893f3d852bcf80f57e30a0e6475bf4fae372cba 100644 (file)
@@ -3,7 +3,7 @@
  */
 function {{ machine_name }}_entity_delete(Drupal\Core\Entity\EntityInterface $entity) {
   // Delete the entity's entry from a fictional table of all entities.
-  db_delete('example_entity')
+  \Drupal::database()->delete('example_entity')
     ->condition('type', $entity->getEntityTypeId())
     ->condition('id', $entity->id())
     ->execute();