You are here

public function ConfigEntityStorage::importCreate in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php \Drupal\Core\Config\Entity\ConfigEntityStorage::importCreate()
  2. 10 core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php \Drupal\Core\Config\Entity\ConfigEntityStorage::importCreate()

Creates entities upon synchronizing configuration changes.

Parameters

string $name: The name of the configuration object.

\Drupal\Core\Config\Config $new_config: A configuration object containing the new configuration data.

\Drupal\Core\Config\Config $old_config: A configuration object containing the old configuration data.

Overrides ImportableEntityStorageInterface::importCreate

1 call to ConfigEntityStorage::importCreate()
ConfigTestStorage::importCreate in core/modules/config/tests/config_test/src/ConfigTestStorage.php
Creates entities upon synchronizing configuration changes.
1 method overrides ConfigEntityStorage::importCreate()
ConfigTestStorage::importCreate in core/modules/config/tests/config_test/src/ConfigTestStorage.php
Creates entities upon synchronizing configuration changes.

File

core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php, line 362

Class

ConfigEntityStorage
Defines the storage class for configuration entities.

Namespace

Drupal\Core\Config\Entity

Code

public function importCreate($name, Config $new_config, Config $old_config) {
  $entity = $this
    ->_doCreateFromStorageRecord($new_config
    ->get(), TRUE);
  $entity
    ->save();
  return TRUE;
}