Issue #1963392 by Xano: Update Entity Reference's exclusion of config entities.
							parent
							
								
									1ad0adedc5
								
							
						
					
					
						commit
						e16a4241c5
					
				| 
						 | 
					@ -170,10 +170,10 @@ function entity_reference_field_settings_form($field, $instance, $has_data) {
 | 
				
			||||||
  // Select the target entity type.
 | 
					  // Select the target entity type.
 | 
				
			||||||
  $entity_type_options = array();
 | 
					  $entity_type_options = array();
 | 
				
			||||||
  foreach (entity_get_info() as $entity_type => $entity_info) {
 | 
					  foreach (entity_get_info() as $entity_type => $entity_info) {
 | 
				
			||||||
    // @todo Remove this ugly hack, needed for now because Config entities have
 | 
					    // @todo As the database schema can currently only store numeric IDs of
 | 
				
			||||||
    // no EFQ support. Revisit after http://drupal.org/node/1853856 and
 | 
					    // referenced entities and configuration entities have string IDs, prevent
 | 
				
			||||||
    // http://drupal.org/node/1846454.
 | 
					    // configuration entities from being referenced.
 | 
				
			||||||
    if (!is_subclass_of($entity_info['class'], '\Drupal\Core\Config\Entity\ConfigEntityBase')) {
 | 
					    if (!in_array('\Drupal\Core\Config\Entity\ConfigEntityInterface', class_implements($entity_info['class']))) {
 | 
				
			||||||
      $entity_type_options[$entity_type] = $entity_info['label'];
 | 
					      $entity_type_options[$entity_type] = $entity_info['label'];
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue