summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathaniel Catchpole2016-02-15 07:35:51 (GMT)
committerNathaniel Catchpole2016-02-15 07:35:51 (GMT)
commit8224349d38c50e2e90f514bf93a09ef8f8681bed (patch)
tree43b4e769eb32f1ce164403bd64c10c493740f860
parentbfbd17e3055bde4134fdfd0921a1e5e2720797e3 (diff)
Issue #2641532 by Mac_Weber: Replace deprecated usage of entity_create('entity_form_display') with a direct call to EntityFormDisplay::create()
-rw-r--r--core/includes/entity.inc3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/includes/entity.inc b/core/includes/entity.inc
index 70e8019..9e6d5b6 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,