From e16a4241c5e9b50f0dfb99654ee7b43ecf5ee2ba Mon Sep 17 00:00:00 2001 From: Alex Pott Date: Fri, 19 Apr 2013 09:29:22 +0100 Subject: [PATCH] Issue #1963392 by Xano: Update Entity Reference's exclusion of config entities. --- core/modules/entity_reference/entity_reference.module | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/modules/entity_reference/entity_reference.module b/core/modules/entity_reference/entity_reference.module index 7125faeb8166..3c68c4618b8f 100644 --- a/core/modules/entity_reference/entity_reference.module +++ b/core/modules/entity_reference/entity_reference.module @@ -170,10 +170,10 @@ function entity_reference_field_settings_form($field, $instance, $has_data) { // Select the target entity type. $entity_type_options = array(); foreach (entity_get_info() as $entity_type => $entity_info) { - // @todo Remove this ugly hack, needed for now because Config entities have - // no EFQ support. Revisit after http://drupal.org/node/1853856 and - // http://drupal.org/node/1846454. - if (!is_subclass_of($entity_info['class'], '\Drupal\Core\Config\Entity\ConfigEntityBase')) { + // @todo As the database schema can currently only store numeric IDs of + // referenced entities and configuration entities have string IDs, prevent + // configuration entities from being referenced. + if (!in_array('\Drupal\Core\Config\Entity\ConfigEntityInterface', class_implements($entity_info['class']))) { $entity_type_options[$entity_type] = $entity_info['label']; } }