public function FactoryInterface::createInstance

Returns a preconfigured 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.

2 methods override FactoryInterface::createInstance()
DefaultFactory::createInstance in drupal/core/lib/Drupal/Component/Plugin/Factory/DefaultFactory.php
Implements Drupal\Component\Plugin\Factory\FactoryInterface::createInstance().
PluginManagerBase::createInstance in drupal/core/lib/Drupal/Component/Plugin/PluginManagerBase.php
Returns a preconfigured instance of a plugin.

File

drupal/core/lib/Drupal/Component/Plugin/Factory/FactoryInterface.php, line 25
Definition of Drupal\Component\Plugin\Factory\FactoryInterface.

Class

FactoryInterface
Factory interface implemented by all plugin factories.

Namespace

Drupal\Component\Plugin\Factory

Code

public function createInstance($plugin_id, array $configuration);