diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php index 97a9bec..f3b1cd6 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php @@ -38,7 +38,7 @@ public static function propertyDefinitions(FieldDefinitionInterface $field_defin $target_type = $settings['target_type']; $target_type_info = \Drupal::entityManager()->getDefinition($target_type); - if (is_subclass_of($target_type_info['class'], '\Drupal\Core\Entity\ContentEntityInterface')) { + if ($target_type_info->isSubclassOf('\Drupal\Core\Entity\ContentEntityInterface')) { // @todo: Lookup the entity type's ID data type and use it here. // https://drupal.org/node/2107249 $properties['target_id'] = DataDefinition::create('integer') diff --git a/core/modules/entity_reference/lib/Drupal/entity_reference/ConfigurableEntityReferenceItem.php b/core/modules/entity_reference/lib/Drupal/entity_reference/ConfigurableEntityReferenceItem.php index 401978a..5af3028 100644 --- a/core/modules/entity_reference/lib/Drupal/entity_reference/ConfigurableEntityReferenceItem.php +++ b/core/modules/entity_reference/lib/Drupal/entity_reference/ConfigurableEntityReferenceItem.php @@ -28,15 +28,6 @@ class ConfigurableEntityReferenceItem extends ConfigEntityReferenceItemBase implements ConfigFieldItemInterface { /** - * Definitions of the contained properties. - * - * @see ConfigurableEntityReferenceItem::getPropertyDefinitions(propertyDefinitions - * - * @var array - */ - static $propertyDefinitions; - - /** * {@inheritdoc} */ public static function propertyDefinitions(FieldDefinitionInterface $field_definition) { @@ -44,7 +35,7 @@ public static function propertyDefinitions(FieldDefinitionInterface $field_defin $target_type = $settings['target_type']; // Call the parent to define the target_id and entity properties. - $properties = parent::getPropertyDefinitions(); + $properties = parent::propertyDefinitions($field_definition); // Only add the revision ID property if the target entity type supports // revisions.