From 8224349d38c50e2e90f514bf93a09ef8f8681bed Mon Sep 17 00:00:00 2001 From: Nathaniel Catchpole Date: Mon, 15 Feb 2016 16:35:51 +0900 Subject: [PATCH] Issue #2641532 by Mac_Weber: Replace deprecated usage of entity_create('entity_form_display') with a direct call to EntityFormDisplay::create() --- core/includes/entity.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/includes/entity.inc b/core/includes/entity.inc index 70e8019a8242..9e6d5b69ae98 100644 --- a/core/includes/entity.inc +++ b/core/includes/entity.inc @@ -6,6 +6,7 @@ */ use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Entity\Entity\EntityFormDisplay; /** * Clears the entity render cache for all entity types. @@ -545,7 +546,7 @@ function entity_get_form_display($entity_type, $bundle, $form_mode) { // configuration entries are only created when an entity form display is // explicitly configured and saved. if (!$entity_form_display) { - $entity_form_display = entity_create('entity_form_display', array( + $entity_form_display = EntityFormDisplay::create(array( 'targetEntityType' => $entity_type, 'bundle' => $bundle, 'mode' => $form_mode,