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_update.twig
index 04a18276bbf53a348e138922f58284ae13f13684..9cc8636e3ebe41f870195afdb826bbc0ef2dc6b6 100644 (file)
@@ -3,7 +3,7 @@
  */
 function {{ machine_name }}_entity_update(Drupal\Core\Entity\EntityInterface $entity) {
   // Update the entity's entry in a fictional table of all entities.
-  db_update('example_entity')
+  \Drupal::database()->update('example_entity')
     ->fields([
       'updated' => REQUEST_TIME,
     ])