Commit 30cad25c authored by catch's avatar catch

Issue #2031717 by Berdir, swentel, fago: Make entity module not required.

parent 3afec501
# Schema for Configuration files of the entity module. # Schema for Configuration files of the entity module.
entity.view_mode.*.*: core.entity_view_mode.*.*:
type: mapping type: mapping
label: 'Entity view mode settings' label: 'Entity view mode settings'
mapping: mapping:
...@@ -29,7 +29,7 @@ entity.view_mode.*.*: ...@@ -29,7 +29,7 @@ entity.view_mode.*.*:
type: config_dependencies type: config_dependencies
label: 'Dependencies' label: 'Dependencies'
entity.form_mode.*.*: core.entity_form_mode.*.*:
type: config_entity type: config_entity
label: 'Entity form mode settings' label: 'Entity form mode settings'
mapping: mapping:
...@@ -47,7 +47,7 @@ entity.form_mode.*.*: ...@@ -47,7 +47,7 @@ entity.form_mode.*.*:
label: 'Cache' label: 'Cache'
# Overview configuration information for view mode or form mode displays. # Overview configuration information for view mode or form mode displays.
entity.view_display.*.*.*: core.entity_view_display.*.*.*:
type: config_entity type: config_entity
label: 'Entity display' label: 'Entity display'
mapping: mapping:
...@@ -79,7 +79,7 @@ entity.view_display.*.*.*: ...@@ -79,7 +79,7 @@ entity.view_display.*.*.*:
label: 'Value' label: 'Value'
# Overview configuration information for form mode displays. # Overview configuration information for form mode displays.
entity.form_display.*.*.*: core.entity_form_display.*.*.*:
type: config_entity type: config_entity
label: 'Entity form display' label: 'Entity form display'
mapping: mapping:
......
...@@ -250,7 +250,7 @@ public function toArray() { ...@@ -250,7 +250,7 @@ public function toArray() {
$id_key = $this->getEntityType()->getKey('id'); $id_key = $this->getEntityType()->getKey('id');
foreach (array_keys($definition['mapping']) as $name) { foreach (array_keys($definition['mapping']) as $name) {
// Special handling for IDs so that computed compound IDs work. // Special handling for IDs so that computed compound IDs work.
// @see \Drupal\entity\EntityDisplayBase::id() // @see \Drupal\Core\Entity\EntityDisplayBase::id()
if ($name == $id_key) { if ($name == $id_key) {
$properties[$name] = $this->id(); $properties[$name] = $this->id();
} }
......
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
namespace Drupal\Core\Config\Entity; namespace Drupal\Core\Config\Entity;
use Drupal\Core\Entity\Entity\EntityFormDisplay;
use Drupal\Core\Entity\Entity\EntityViewDisplay;
use Drupal\Core\Entity\EntityStorageInterface; use Drupal\Core\Entity\EntityStorageInterface;
/** /**
...@@ -17,6 +19,48 @@ ...@@ -17,6 +19,48 @@
*/ */
abstract class ConfigEntityBundleBase extends ConfigEntityBase { abstract class ConfigEntityBundleBase extends ConfigEntityBase {
/**
* Renames displays when a bundle is renamed.
*/
protected function renameDisplays() {
// Rename entity displays.
if ($this->getOriginalId() !== $this->id()) {
foreach ($this->loadDisplays('entity_view_display') as $display) {
$new_id = $this->getEntityType()->getBundleOf() . '.' . $this->id() . '.' . $display->mode;
$display->set('id', $new_id);
$display->bundle = $this->id();
$display->save();
}
}
// Rename entity form displays.
if ($this->getOriginalId() !== $this->id()) {
foreach ($this->loadDisplays('entity_form_display') as $form_display) {
$new_id = $this->getEntityType()->getBundleOf() . '.' . $this->id() . '.' . $form_display->mode;
$form_display->set('id', $new_id);
$form_display->bundle = $this->id();
$form_display->save();
}
}
}
/**
* Deletes display if a bundle is deleted.
*/
protected function deleteDisplays() {
// Remove entity displays of the deleted bundle.
if ($displays = $this->loadDisplays('entity_view_display')) {
$storage = $this->entityManager()->getStorage('entity_view_display');
$storage->delete($displays);
}
// Remove entity form displays of the deleted bundle.
if ($displays = $this->loadDisplays('entity_form_display')) {
$storage = $this->entityManager()->getStorage('entity_form_display');
$storage->delete($displays);
}
}
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
...@@ -27,6 +71,7 @@ public function postSave(EntityStorageInterface $storage, $update = TRUE) { ...@@ -27,6 +71,7 @@ public function postSave(EntityStorageInterface $storage, $update = TRUE) {
entity_invoke_bundle_hook('create', $this->getEntityType()->getBundleOf(), $this->id()); entity_invoke_bundle_hook('create', $this->getEntityType()->getBundleOf(), $this->id());
} }
elseif ($this->getOriginalId() != $this->id()) { elseif ($this->getOriginalId() != $this->id()) {
$this->renameDisplays();
entity_invoke_bundle_hook('rename', $this->getEntityType()->getBundleOf(), $this->getOriginalId(), $this->id()); entity_invoke_bundle_hook('rename', $this->getEntityType()->getBundleOf(), $this->getOriginalId(), $this->id());
} }
} }
...@@ -38,8 +83,29 @@ public static function postDelete(EntityStorageInterface $storage, array $entiti ...@@ -38,8 +83,29 @@ public static function postDelete(EntityStorageInterface $storage, array $entiti
parent::postDelete($storage, $entities); parent::postDelete($storage, $entities);
foreach ($entities as $entity) { foreach ($entities as $entity) {
$entity->deleteDisplays();
entity_invoke_bundle_hook('delete', $entity->getEntityType()->getBundleOf(), $entity->id()); entity_invoke_bundle_hook('delete', $entity->getEntityType()->getBundleOf(), $entity->id());
} }
} }
/**
* Returns view or form displays for this bundle.
*
* @param string $entity_type_id
* The entity type ID of the display type to load.
*
* @return \Drupal\Core\Entity\Display\EntityDisplayInterface[]
* A list of matching displays.
*/
protected function loadDisplays($entity_type_id) {
$ids = \Drupal::entityQuery($entity_type_id)
->condition('id', $this->getEntityType()->getBundleOf() . '.' . $this->getOriginalId() . '.', 'STARTS_WITH')
->execute();
if ($ids) {
$storage = $this->entityManager()->getStorage($entity_type_id);
return $storage->loadMultiple($ids);
}
return array();
}
} }
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
namespace Drupal\Core\Entity; namespace Drupal\Core\Entity;
use Drupal\Core\Entity\Display\EntityFormDisplayInterface; use Drupal\Core\Entity\Display\EntityFormDisplayInterface;
use Drupal\Core\Entity\Entity\EntityFormDisplay;
use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Form\FormStateInterface;
use Drupal\entity\Entity\EntityFormDisplay;
use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\ContainerInterface;
/** /**
......
...@@ -2,15 +2,15 @@ ...@@ -2,15 +2,15 @@
/** /**
* @file * @file
* Contains \Drupal\entity\Entity\EntityFormDisplay. * Contains \Drupal\Core\Entity\Entity\EntityFormDisplay.
*/ */
namespace Drupal\entity\Entity; namespace Drupal\Core\Entity\Entity;
use Drupal\Core\Entity\ContentEntityInterface; use Drupal\Core\Entity\ContentEntityInterface;
use Drupal\Core\Entity\Display\EntityFormDisplayInterface; use Drupal\Core\Entity\Display\EntityFormDisplayInterface;
use Drupal\Core\Entity\EntityDisplayBase;
use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Form\FormStateInterface;
use Drupal\entity\EntityDisplayBase;
/** /**
* Configuration entity that contains widget options for all components of a * Configuration entity that contains widget options for all components of a
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
* @ConfigEntityType( * @ConfigEntityType(
* id = "entity_form_display", * id = "entity_form_display",
* label = @Translation("Entity form display"), * label = @Translation("Entity form display"),
* config_prefix = "form_display",
* entity_keys = { * entity_keys = {
* "id" = "id", * "id" = "id",
* "status" = "status" * "status" = "status"
......
...@@ -2,16 +2,16 @@ ...@@ -2,16 +2,16 @@
/** /**
* @file * @file
* Contains \Drupal\entity\Entity\EntityFormMode. * Contains \Drupal\Core\Entity\Entity\EntityFormMode.
*/ */
namespace Drupal\entity\Entity; namespace Drupal\Core\Entity\Entity;
use Drupal\entity\EntityDisplayModeBase; use Drupal\Core\Entity\EntityDisplayModeBase;
use Drupal\entity\EntityFormModeInterface; use Drupal\Core\Entity\EntityFormModeInterface;
/** /**
* Defines the form mode configuration entity class. * Defines the entity form mode configuration entity class.
* *
* Form modes allow entity forms to be displayed differently depending on the * Form modes allow entity forms to be displayed differently depending on the
* context. For instance, the user entity form can be displayed with a set of * context. For instance, the user entity form can be displayed with a set of
...@@ -26,27 +26,13 @@ ...@@ -26,27 +26,13 @@
* *
* @see \Drupal\Core\Entity\EntityManagerInterface::getAllFormModes() * @see \Drupal\Core\Entity\EntityManagerInterface::getAllFormModes()
* @see \Drupal\Core\Entity\EntityManagerInterface::getFormModes() * @see \Drupal\Core\Entity\EntityManagerInterface::getFormModes()
* @see hook_entity_form_mode_info_alter()
* *
* @ConfigEntityType( * @ConfigEntityType(
* id = "form_mode", * id = "entity_form_mode",
* label = @Translation("Form mode"), * label = @Translation("Form mode"),
* handlers = {
* "list_builder" = "Drupal\entity\EntityFormModeListBuilder",
* "form" = {
* "add" = "Drupal\entity\Form\EntityFormModeAddForm",
* "edit" = "Drupal\entity\Form\EntityDisplayModeEditForm",
* "delete" = "Drupal\entity\Form\EntityDisplayModeDeleteForm"
* }
* },
* admin_permission = "administer display modes",
* entity_keys = { * entity_keys = {
* "id" = "id", * "id" = "id",
* "label" = "label" * "label" = "label"
* },
* links = {
* "delete-form" = "entity.form_mode.delete_form",
* "edit-form" = "entity.form_mode.edit_form"
* } * }
* ) * )
*/ */
......
...@@ -2,15 +2,15 @@ ...@@ -2,15 +2,15 @@
/** /**
* @file * @file
* Contains \Drupal\entity\Entity\EntityViewDisplay. * Contains \Drupal\Core\Entity\Entity\EntityViewDisplay.
*/ */
namespace Drupal\entity\Entity; namespace Drupal\Core\Entity\Entity;
use Drupal\Component\Utility\NestedArray; use Drupal\Component\Utility\NestedArray;
use Drupal\Core\Entity\Display\EntityViewDisplayInterface; use Drupal\Core\Entity\Display\EntityViewDisplayInterface;
use Drupal\Core\Entity\ContentEntityInterface; use Drupal\Core\Entity\ContentEntityInterface;
use Drupal\entity\EntityDisplayBase; use Drupal\Core\Entity\EntityDisplayBase;
/** /**
* Configuration entity that contains display options for all components of a * Configuration entity that contains display options for all components of a
...@@ -19,10 +19,6 @@ ...@@ -19,10 +19,6 @@
* @ConfigEntityType( * @ConfigEntityType(
* id = "entity_view_display", * id = "entity_view_display",
* label = @Translation("Entity view display"), * label = @Translation("Entity view display"),
* handlers = {
* "storage" = "Drupal\Core\Config\Entity\ConfigEntityStorage"
* },
* config_prefix = "view_display",
* entity_keys = { * entity_keys = {
* "id" = "id", * "id" = "id",
* "status" = "status" * "status" = "status"
......
...@@ -2,16 +2,16 @@ ...@@ -2,16 +2,16 @@
/** /**
* @file * @file
* Contains \Drupal\entity\Entity\EntityViewMode. * Contains \Drupal\Core\Entity\Entity\EntityViewMode.
*/ */
namespace Drupal\entity\Entity; namespace Drupal\Core\Entity\Entity;
use Drupal\entity\EntityDisplayModeBase; use Drupal\Core\Entity\EntityDisplayModeBase;
use Drupal\entity\EntityViewModeInterface; use Drupal\Core\Entity\EntityViewModeInterface;
/** /**
* Defines the view mode configuration entity class. * Defines the entity view mode configuration entity class.
* *
* View modes let entities be displayed differently depending on the context. * View modes let entities be displayed differently depending on the context.
* For instance, a node can be displayed differently on its own page ('full' * For instance, a node can be displayed differently on its own page ('full'
...@@ -30,24 +30,11 @@ ...@@ -30,24 +30,11 @@
* @see hook_entity_view_mode_info_alter() * @see hook_entity_view_mode_info_alter()
* *
* @ConfigEntityType( * @ConfigEntityType(
* id = "view_mode", * id = "entity_view_mode",
* label = @Translation("View mode"), * label = @Translation("View mode"),
* handlers = {
* "list_builder" = "Drupal\entity\EntityDisplayModeListBuilder",
* "form" = {
* "add" = "Drupal\entity\Form\EntityDisplayModeAddForm",
* "edit" = "Drupal\entity\Form\EntityDisplayModeEditForm",
* "delete" = "Drupal\entity\Form\EntityDisplayModeDeleteForm"
* }
* },
* admin_permission = "administer display modes",
* entity_keys = { * entity_keys = {
* "id" = "id", * "id" = "id",
* "label" = "label" * "label" = "label"
* },
* links = {
* "delete-form" = "entity.view_mode.delete_form",
* "edit-form" = "entity.view_mode.edit_form"
* } * }
* ) * )
*/ */
......
...@@ -2,13 +2,12 @@ ...@@ -2,13 +2,12 @@
/** /**
* @file * @file
* Contains \Drupal\entity\EntityDisplayBase. * Contains \Drupal\Core\Entity\EntityDisplayBase.
*/ */
namespace Drupal\entity; namespace Drupal\Core\Entity;
use Drupal\Core\Config\Entity\ConfigEntityBase; use Drupal\Core\Config\Entity\ConfigEntityBase;
use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Field\FieldDefinitionInterface; use Drupal\Core\Field\FieldDefinitionInterface;
use Drupal\Core\Entity\Display\EntityDisplayInterface; use Drupal\Core\Entity\Display\EntityDisplayInterface;
use Drupal\field\Entity\FieldInstanceConfig; use Drupal\field\Entity\FieldInstanceConfig;
...@@ -186,7 +185,7 @@ public function calculateDependencies() { ...@@ -186,7 +185,7 @@ public function calculateDependencies() {
} }
// Depend on configured modes. // Depend on configured modes.
if ($this->mode != 'default') { if ($this->mode != 'default') {
$mode_entity = \Drupal::entityManager()->getStorage($this->displayContext . '_mode')->load($target_entity_type->id() . '.' . $this->mode); $mode_entity = \Drupal::entityManager()->getStorage('entity_' . $this->displayContext . '_mode')->load($target_entity_type->id() . '.' . $this->mode);
$this->addDependency('entity', $mode_entity->getConfigDependencyName()); $this->addDependency('entity', $mode_entity->getConfigDependencyName());
} }
return $this->dependencies; return $this->dependencies;
......
...@@ -2,14 +2,13 @@ ...@@ -2,14 +2,13 @@
/** /**
* @file * @file
* Contains \Drupal\entity\EntityDisplayModeBase. * Contains \Drupal\Core\Entity\EntityDisplayModeBase.
*/ */
namespace Drupal\entity; namespace Drupal\Core\Entity;
use Drupal\Core\Config\Entity\ConfigEntityBase; use Drupal\Core\Config\Entity\ConfigEntityBase;
use Drupal\Core\Config\Entity\ConfigEntityInterface; use Drupal\Core\Config\Entity\ConfigEntityInterface;
use Drupal\Core\Entity\EntityStorageInterface;
/** /**
* Base class for config entity types that hold settings for form and view modes. * Base class for config entity types that hold settings for form and view modes.
...@@ -63,8 +62,8 @@ abstract class EntityDisplayModeBase extends ConfigEntityBase implements EntityD ...@@ -63,8 +62,8 @@ abstract class EntityDisplayModeBase extends ConfigEntityBase implements EntityD
* {@inheritdoc} * {@inheritdoc}
*/ */
public static function sort(ConfigEntityInterface $a, ConfigEntityInterface $b) { public static function sort(ConfigEntityInterface $a, ConfigEntityInterface $b) {
/** @var \Drupal\entity\EntityDisplayModeInterface $a */ /** @var \Drupal\Core\Entity\EntityDisplayModeInterface $a */
/** @var \Drupal\entity\EntityDisplayModeInterface $b */ /** @var \Drupal\Core\Entity\EntityDisplayModeInterface $b */
// Sort by the type of entity the view mode is used for. // Sort by the type of entity the view mode is used for.
$a_type = $a->getTargetType(); $a_type = $a->getTargetType();
$b_type = $b->getTargetType(); $b_type = $b->getTargetType();
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
/** /**
* @file * @file
* Contains \Drupal\entity\EntityDisplayModeInterface. * Contains \Drupal\Core\Entity\EntityDisplayModeInterface.
*/ */
namespace Drupal\entity; namespace Drupal\Core\Entity;
use Drupal\Core\Config\Entity\ConfigEntityInterface; use Drupal\Core\Config\Entity\ConfigEntityInterface;
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
/** /**
* @file * @file
* Contains \Drupal\entity\EntityFormModeInterface. * Contains \Drupal\Core\Entity\EntityFormModeInterface.
*/ */
namespace Drupal\entity; namespace Drupal\Core\Entity;
/** /**
* Provides an interface defining an entity form mode entity type. * Provides an interface defining an entity form mode entity type.
......
...@@ -832,13 +832,14 @@ public function getFormModes($entity_type_id) { ...@@ -832,13 +832,14 @@ public function getFormModes($entity_type_id) {
protected function getAllDisplayModesByEntityType($display_type) { protected function getAllDisplayModesByEntityType($display_type) {
if (!isset($this->displayModeInfo[$display_type])) { if (!isset($this->displayModeInfo[$display_type])) {
$key = 'entity_' . $display_type . '_info'; $key = 'entity_' . $display_type . '_info';
$entity_type_id = 'entity_' . $display_type;
$langcode = $this->languageManager->getCurrentLanguage(LanguageInterface::TYPE_INTERFACE)->id; $langcode = $this->languageManager->getCurrentLanguage(LanguageInterface::TYPE_INTERFACE)->id;
if ($cache = $this->cacheBackend->get("$key:$langcode")) { if ($cache = $this->cacheBackend->get("$key:$langcode")) {
$this->displayModeInfo[$display_type] = $cache->data; $this->displayModeInfo[$display_type] = $cache->data;
} }
else { else {
$this->displayModeInfo[$display_type] = array(); $this->displayModeInfo[$display_type] = array();
foreach ($this->getStorage($display_type)->loadMultiple() as $display_mode) { foreach ($this->getStorage($entity_type_id)->loadMultiple() as $display_mode) {
list($display_mode_entity_type, $display_mode_name) = explode('.', $display_mode->id(), 2); list($display_mode_entity_type, $display_mode_name) = explode('.', $display_mode->id(), 2);
$this->displayModeInfo[$display_type][$display_mode_entity_type][$display_mode_name] = $display_mode->toArray(); $this->displayModeInfo[$display_type][$display_mode_entity_type][$display_mode_name] = $display_mode->toArray();
} }
......
...@@ -10,14 +10,13 @@ ...@@ -10,14 +10,13 @@
use Drupal\Component\Utility\NestedArray; use Drupal\Component\Utility\NestedArray;
use Drupal\Core\Cache\Cache; use Drupal\Core\Cache\Cache;
use Drupal\Core\Entity\Display\EntityViewDisplayInterface; use Drupal\Core\Entity\Display\EntityViewDisplayInterface;
use Drupal\Core\Entity\ContentEntityInterface;
use Drupal\Core\Field\FieldItemInterface; use Drupal\Core\Field\FieldItemInterface;
use Drupal\Core\Field\FieldItemListInterface; use Drupal\Core\Field\FieldItemListInterface;
use Drupal\Core\Language\LanguageInterface; use Drupal\Core\Language\LanguageInterface;
use Drupal\Core\Language\LanguageManagerInterface; use Drupal\Core\Language\LanguageManagerInterface;
use Drupal\Core\TypedData\TranslatableInterface; use Drupal\Core\TypedData\TranslatableInterface;
use Drupal\Core\Render\Element; use Drupal\Core\Render\Element;
use Drupal\entity\Entity\EntityViewDisplay; use Drupal\Core\Entity\Entity\EntityViewDisplay;
use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\ContainerInterface;
/** /**
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
/** /**
* @file * @file
* Contains \Drupal\entity\EntityViewModeInterface. * Contains \Drupal\Core\Entity\EntityViewModeInterface.
*/ */
namespace Drupal\entity; namespace Drupal\Core\Entity;
/** /**
* Provides an interface defining an entity view mode entity type. * Provides an interface defining an entity view mode entity type.
......
...@@ -942,7 +942,19 @@ public function uninstall(array $module_list, $uninstall_dependents = TRUE) { ...@@ -942,7 +942,19 @@ public function uninstall(array $module_list, $uninstall_dependents = TRUE) {
// the module already, which means that it might be loaded, but not // the module already, which means that it might be loaded, but not
// necessarily installed. // necessarily installed.
$schema_store = \Drupal::keyValue('system.schema'); $schema_store = \Drupal::keyValue('system.schema');
$entity_manager = \Drupal::entityManager();
foreach ($module_list as $module) { foreach ($module_list as $module) {
// Clean up all entity bundles (including field instances) of every entity
// type provided by the module that is being uninstalled.
foreach ($entity_manager->getDefinitions() as $entity_type_id => $entity_type) {
if ($entity_type->getProvider() == $module) {
foreach (array_keys($entity_manager->getBundleInfo($entity_type_id)) as $bundle) {
entity_invoke_bundle_hook('delete', $entity_type_id, $bundle);
}
}
}
// Allow modules to react prior to the uninstallation of a module. // Allow modules to react prior to the uninstallation of a module.
$this->invokeAll('module_preuninstall', array($module)); $this->invokeAll('module_preuninstall', array($module));
...@@ -954,7 +966,7 @@ public function uninstall(array $module_list, $uninstall_dependents = TRUE) { ...@@ -954,7 +966,7 @@ public function uninstall(array $module_list, $uninstall_dependents = TRUE) {
\Drupal::service('config.manager')->uninstall('module', $module); \Drupal::service('config.manager')->uninstall('module', $module);
// Remove any entity schemas belonging to the module. // Remove any entity schemas belonging to the module.
$entity_manager = \Drupal::entityManager();
$schema = \Drupal::database()->schema(); $schema = \Drupal::database()->schema();
foreach ($entity_manager->getDefinitions() as $entity_type) { foreach ($entity_manager->getDefinitions() as $entity_type) {
if ($entity_type->getProvider() == $module) { if ($entity_type->getProvider() == $module) {
......
...@@ -24,7 +24,7 @@ class BlockContentCreationTest extends BlockContentTestBase { ...@@ -24,7 +24,7 @@ class BlockContentCreationTest extends BlockContentTestBase {
* *
* @var array * @var array
*/ */
public static $modules = array('block_content_test', 'dblog'); public static $modules = array('block_content_test', 'dblog', 'entity');
/** /**
* Sets the test up. * Sets the test up.
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Routing\RouteMatchInterface; use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\entity\Entity\EntityViewDisplay; use Drupal\Core\Entity\Entity\EntityViewDisplay;
use Drupal\Core\Entity\Display\EntityViewDisplayInterface; use Drupal\Core\Entity\Display\EntityViewDisplayInterface;
use Drupal\Core\Field\FieldDefinitionInterface; use Drupal\Core\Field\FieldDefinitionInterface;
use Drupal\Core\Render\Element; use Drupal\Core\Render\Element;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
use Drupal\Core\Entity\EntityManagerInterface; use Drupal\Core\Entity\EntityManagerInterface;
use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\Core\Entity\EntityViewBuilder; use Drupal\Core\Entity\EntityViewBuilder;
use Drupal\entity\Entity\EntityViewDisplay;