Further Drupal 8.6.4 changes. Some core files were not committed before a commit...
[yaffs-website] / web / core / lib / Drupal / Component / Plugin / Factory / FactoryInterface.php
1 <?php
2
3 namespace Drupal\Component\Plugin\Factory;
4
5 /**
6  * Factory interface implemented by all plugin factories.
7  */
8 interface FactoryInterface {
9
10   /**
11    * Creates a pre-configured instance of a plugin.
12    *
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.
17    *
18    * @return object
19    *   A fully configured plugin instance.
20    *
21    * @throws \Drupal\Component\Plugin\Exception\PluginException
22    *   If the instance cannot be created, such as if the ID is invalid.
23    */
24   public function createInstance($plugin_id, array $configuration = []);
25
26 }