3 namespace Drupal\Component\Plugin\Factory;
6 * Factory interface implemented by all plugin factories.
8 interface FactoryInterface {
11 * Creates a pre-configured instance of a plugin.
13 * @param string $plugin_id
14 * The ID of the plugin being instantiated.
15 * @param array $configuration
16 * An array of configuration relevant to the plugin instance.
19 * A fully configured plugin instance.
21 * @throws \Drupal\Component\Plugin\Exception\PluginException
22 * If the instance cannot be created, such as if the ID is invalid.
24 public function createInstance($plugin_id, array $configuration = []);