You are here

public function EntityManagerWrapper::createInstance in Devel 8

Same name and namespace in other branches
  1. 8.3 webprofiler/src/Entity/EntityManagerWrapper.php \Drupal\webprofiler\Entity\EntityManagerWrapper::createInstance()
  2. 8.2 webprofiler/src/Entity/EntityManagerWrapper.php \Drupal\webprofiler\Entity\EntityManagerWrapper::createInstance()
  3. 4.x webprofiler/src/Entity/EntityManagerWrapper.php \Drupal\webprofiler\Entity\EntityManagerWrapper::createInstance()

Creates a pre-configured instance of a plugin.

Parameters

string $plugin_id: The ID of the plugin being instantiated.

array $configuration: An array of configuration relevant to the plugin instance.

Return value

object A fully configured plugin instance.

Throws

\Drupal\Component\Plugin\Exception\PluginException If the instance cannot be created, such as if the ID is invalid.

Overrides PluginManagerBase::createInstance

File

webprofiler/src/Entity/EntityManagerWrapper.php, line 225

Class

EntityManagerWrapper
Class EntityManagerWrapper

Namespace

Drupal\webprofiler\Entity

Code

public function createInstance($plugin_id, array $configuration = []) {
  return $this->entityManager
    ->createInstance($plugin_id, $configuration);
}