diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php b/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php index 75be9cd..46db8c7 100644 --- a/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php +++ b/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php @@ -389,9 +389,9 @@ public function save(EntityInterface $entity) { */ protected function invokeHook($hook, EntityInterface $entity) { // Invoke the hook. - $this->moduleHandler->invokeAll($this->entityTypeId . '_' . $hook, $entity); + $this->moduleHandler->invokeAll($this->entityTypeId . '_' . $hook, array($entity)); // Invoke the respective entity-level hook. - $this->moduleHandler->invokeAll('entity_' . $hook, $entity, $this->entityTypeId); + $this->moduleHandler->invokeAll('entity_' . $hook, array($entity, $this->entityTypeId)); } /** diff --git a/core/lib/Drupal/Core/Entity/EntityViewBuilder.php b/core/lib/Drupal/Core/Entity/EntityViewBuilder.php index 7cb6f46..751f021 100644 --- a/core/lib/Drupal/Core/Entity/EntityViewBuilder.php +++ b/core/lib/Drupal/Core/Entity/EntityViewBuilder.php @@ -113,7 +113,7 @@ public function buildContent(array $entities, array $displays, $view_mode, $lang } // Invoke hook_entity_prepare_view(). - \Drupal::moduleHandler()->invokeAll('entity_prepare_view', $this->entityTypeId, $entities, $displays, $view_mode); + \Drupal::moduleHandler()->invokeAll('entity_prepare_view', array($this->entityTypeId, $entities, $displays, $view_mode)); // Let the displays build their render arrays. foreach ($entities_by_bundle as $bundle => $bundle_entities) {