Issue #2641532 by Mac_Weber: Replace deprecated usage of entity_create('entity_form_display') with a direct call to EntityFormDisplay::create()
parent
bfbd17e305
commit
8224349d38
|
@ -6,6 +6,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Drupal\Core\Entity\EntityInterface;
|
use Drupal\Core\Entity\EntityInterface;
|
||||||
|
use Drupal\Core\Entity\Entity\EntityFormDisplay;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clears the entity render cache for all entity types.
|
* 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
|
// configuration entries are only created when an entity form display is
|
||||||
// explicitly configured and saved.
|
// explicitly configured and saved.
|
||||||
if (!$entity_form_display) {
|
if (!$entity_form_display) {
|
||||||
$entity_form_display = entity_create('entity_form_display', array(
|
$entity_form_display = EntityFormDisplay::create(array(
|
||||||
'targetEntityType' => $entity_type,
|
'targetEntityType' => $entity_type,
|
||||||
'bundle' => $bundle,
|
'bundle' => $bundle,
|
||||||
'mode' => $form_mode,
|
'mode' => $form_mode,
|
||||||
|
|
Loading…
Reference in New Issue