diff --git a/core/lib/Drupal/Core/Entity/EntityManager.php b/core/lib/Drupal/Core/Entity/EntityManager.php index 73839c9..9560c71 100644 --- a/core/lib/Drupal/Core/Entity/EntityManager.php +++ b/core/lib/Drupal/Core/Entity/EntityManager.php @@ -987,7 +987,7 @@ public function onEntityTypeCreate(EntityTypeInterface $entity_type) { } $this->setLastInstalledDefinition($entity_type); - if ($entity_type->isSubclassOf('\Drupal\Core\Entity\ContentEntityInterface')) { + if ($entity_type->isSubclassOf('\Drupal\Core\Entity\FieldableEntityInterface')) { $this->setLastInstalledFieldStorageDefinitions($entity_type_id, $this->getFieldStorageDefinitions($entity_type_id)); } } diff --git a/core/lib/Drupal/Core/Entity/TypedData/EntityDataDefinition.php b/core/lib/Drupal/Core/Entity/TypedData/EntityDataDefinition.php index 30a63a2..95f44a9 100644 --- a/core/lib/Drupal/Core/Entity/TypedData/EntityDataDefinition.php +++ b/core/lib/Drupal/Core/Entity/TypedData/EntityDataDefinition.php @@ -59,7 +59,7 @@ public function getPropertyDefinitions() { if ($entity_type_id = $this->getEntityTypeId()) { // Return an empty array for entities that are not content entities. $entity_type_class = \Drupal::entityManager()->getDefinition($entity_type_id)->getClass(); - if (!in_array('Drupal\Core\Entity\ContentEntityInterface', class_implements($entity_type_class))) { + if (!in_array('Drupal\Core\Entity\FieldableEntityInterface', class_implements($entity_type_class))) { $this->propertyDefinitions = array(); } else { diff --git a/core/lib/Drupal/Core/Field/FieldItemInterface.php b/core/lib/Drupal/Core/Field/FieldItemInterface.php index 26e885e..10628f5 100644 --- a/core/lib/Drupal/Core/Field/FieldItemInterface.php +++ b/core/lib/Drupal/Core/Field/FieldItemInterface.php @@ -90,7 +90,7 @@ public static function schema(FieldStorageDefinitionInterface $field_definition) /** * Gets the entity that field belongs to. * - * @return \Drupal\Core\Entity\ContentEntityInterface + * @return \Drupal\Core\Entity\FieldableEntityInterface * The entity object. */ public function getEntity(); diff --git a/core/modules/options/src/Plugin/Field/FieldWidget/OptionsWidgetBase.php b/core/modules/options/src/Plugin/Field/FieldWidget/OptionsWidgetBase.php index 6ed388e..d690625 100644 --- a/core/modules/options/src/Plugin/Field/FieldWidget/OptionsWidgetBase.php +++ b/core/modules/options/src/Plugin/Field/FieldWidget/OptionsWidgetBase.php @@ -7,7 +7,7 @@ namespace Drupal\options\Plugin\Field\FieldWidget; -use Drupal\Core\Entity\ContentEntityInterface; +use Drupal\Core\Entity\FieldableEntityInterface; use Drupal\Core\Field\FieldDefinitionInterface; use Drupal\Core\Field\FieldItemListInterface; use Drupal\Core\Field\WidgetBase; @@ -114,13 +114,13 @@ public static function validateElement(array $element, FormStateInterface $form_ /** * Returns the array of options for the widget. * - * @param \Drupal\Core\Entity\ContentEntityInterface $entity + * @param \Drupal\Core\Entity\FieldableEntityInterface $entity * The entity for which to return options. * * @return array * The array of options for the widget. */ - protected function getOptions(ContentEntityInterface $entity) { + protected function getOptions(FieldableEntityInterface $entity) { if (!isset($this->options)) { // Limit the settable options for the current user account. $options = $this->fieldDefinition