Issue #2641532 by Mac_Weber: Replace deprecated usage of entity_create('entity_form_display') with a direct call to EntityFormDisplay::create()

8.1.x
Nathaniel Catchpole 2016-02-15 16:35:51 +09:00
parent bfbd17e305
commit 8224349d38
1 changed files with 2 additions and 1 deletions

View File

@ -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,