X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Flib%2FDrupal%2FCore%2FConfig%2FEntity%2FConfigEntityBase.php;fp=web%2Fcore%2Flib%2FDrupal%2FCore%2FConfig%2FEntity%2FConfigEntityBase.php;h=4efcade7a16e6a8f5ac204ce8982cccb8017fe4a;hp=90bb702379994de8f414ff4378dbc594c3619bbe;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php b/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php index 90bb70237..4efcade7a 100644 --- a/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php +++ b/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php @@ -267,18 +267,13 @@ abstract class ConfigEntityBase extends Entity implements ConfigEntityInterface /** @var \Drupal\Core\Config\Entity\ConfigEntityTypeInterface $entity_type */ $entity_type = $this->getEntityType(); - $properties_to_export = $entity_type->getPropertiesToExport(); - if (empty($properties_to_export)) { + $id_key = $entity_type->getKey('id'); + $property_names = $entity_type->getPropertiesToExport($this->id()); + if (empty($property_names)) { $config_name = $entity_type->getConfigPrefix() . '.' . $this->id(); - $definition = $this->getTypedConfig()->getDefinition($config_name); - if (!isset($definition['mapping'])) { - throw new SchemaIncompleteException("Incomplete or missing schema for $config_name"); - } - $properties_to_export = array_combine(array_keys($definition['mapping']), array_keys($definition['mapping'])); + throw new SchemaIncompleteException("Incomplete or missing schema for $config_name"); } - - $id_key = $entity_type->getKey('id'); - foreach ($properties_to_export as $property_name => $export_name) { + foreach ($property_names as $property_name => $export_name) { // Special handling for IDs so that computed compound IDs work. // @see \Drupal\Core\Entity\EntityDisplayBase::id() if ($property_name == $id_key) {