You are here

protected function ContentModelUpdater::createConfigEntity in Panopoly 8.2

Creates a config entity.

Parameters

string $id: The full config entity ID, with provider and type/config prefix.

array $data: Configuration data.

Return value

\Drupal\Core\Config\Entity\ConfigEntityInterface The configuration entity.

1 call to ContentModelUpdater::createConfigEntity()
ContentModelUpdater::installAllOfType in modules/panopoly/panopoly_media/src/Update/ContentModelUpdater.php
Install all config of the specified type.

File

modules/panopoly/panopoly_media/src/Update/ContentModelUpdater.php, line 957

Class

ContentModelUpdater
Applies changes to media content model from schema versions 8204 to 8205.

Namespace

Drupal\panopoly_media\Update

Code

protected function createConfigEntity($id, array $data) {
  list($provider, $config_prefix, $id) = explode('.', $id, 3);
  $class = $this
    ->getConfigEntityClass($provider, $config_prefix);

  /** @var \Drupal\Core\Config\Entity\ConfigEntityInterface $config */
  return $class::create($data);
}