interface FactoryInterface

Factory interface implemented by all plugin factories.

Hierarchy

Expanded class hierarchy of FactoryInterface

All classes that implement FactoryInterface

1 file declares its use of FactoryInterface

File

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

Namespace

Drupal\Component\Plugin\Factory
View source
interface FactoryInterface {

  /**
   * Returns a preconfigured instance of a plugin.
   *
   * @param string $plugin_id
   *   The id of the plugin being instantiated.
   * @param array $configuration
   *   An array of configuration relevant to the plugin instance.
   *
   * @return object
   *   A fully configured plugin instance.
   */
  public function createInstance($plugin_id, array $configuration);

}

Members

Namesort descending Modifiers Type Description Overrides
FactoryInterface::createInstance public function Returns a preconfigured instance of a plugin. 2