diff --git a/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php b/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php index 3a6517652bac945ef5f447db2c5f1c315613a6ad..dee07c1da4f0e6f3008ec00bec2467f3385a3e08 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php @@ -179,6 +179,16 @@ protected function invokeTranslationHooks(ContentEntityInterface $entity) { } } + /** + * {@inheritdoc} + */ + protected function invokeHook($hook, EntityInterface $entity) { + if ($hook == 'presave') { + $this->invokeFieldMethod('preSave', $entity); + } + parent::invokeHook($hook, $entity); + } + /** * Invokes a method on the Field objects within an entity. * diff --git a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php index be6ff7f82208c821621024998e05de1e6db4a2ad..8a5a4a7737696ff5b64ee3aecc0bab0f72ed4376 100644 --- a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php +++ b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php @@ -1055,16 +1055,6 @@ protected function savePropertyData(EntityInterface $entity, $table_name = NULL) $query->execute(); } - /** - * {@inheritdoc} - */ - protected function invokeHook($hook, EntityInterface $entity) { - if ($hook == 'presave') { - $this->invokeFieldMethod('preSave', $entity); - } - parent::invokeHook($hook, $entity); - } - /** * Maps from an entity object to the storage record. *