You are here

public function EntityApiConfiguration::saveToActiveStore in Configuration Management 7.2

Implements Drupal\configuration\Config\Configuration::saveToActiveStore().

Overrides Configuration::saveToActiveStore

File

lib/Drupal/configuration/Config/EntityApiConfiguration.php, line 153
Definition of Drupal\configuration\Config\EntityApiConfiguration.

Class

EntityApiConfiguration

Namespace

Drupal\configuration\Config

Code

public function saveToActiveStore(ConfigIteratorSettings &$settings) {
  $entity = $this
    ->getData();
  $entity_type = $this
    ->getComponent();
  if ($original = entity_load_single($entity_type, $this
    ->getIdentifier())) {
    $entity->id = $original->id;
    unset($entity->is_new);
  }
  $entity
    ->save();
  $settings
    ->addInfo('imported', $this
    ->getUniqueId());
}