function ConfigEntityStorage::importCreate

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

Overrides ImportableEntityStorageInterface::importCreate

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 338

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;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.