interface FactoryInterface
Same name in other branches
- 9 core/lib/Drupal/Component/Plugin/Factory/FactoryInterface.php \Drupal\Component\Plugin\Factory\FactoryInterface
- 8.9.x core/lib/Drupal/Component/Plugin/Factory/FactoryInterface.php \Drupal\Component\Plugin\Factory\FactoryInterface
- 10 core/lib/Drupal/Component/Plugin/Factory/FactoryInterface.php \Drupal\Component\Plugin\Factory\FactoryInterface
Factory interface implemented by all plugin factories.
Hierarchy
- interface \Drupal\Component\Plugin\Factory\FactoryInterface
Expanded class hierarchy of FactoryInterface
All classes that implement FactoryInterface
3 files declare their use of FactoryInterface
- LocalActionManagerTest.php in core/
tests/ Drupal/ Tests/ Core/ Menu/ LocalActionManagerTest.php - PluginManagerInterface.php in core/
lib/ Drupal/ Component/ Plugin/ PluginManagerInterface.php - SectionStorageManagerTest.php in core/
modules/ layout_builder/ tests/ src/ Unit/ SectionStorageManagerTest.php
File
-
core/
lib/ Drupal/ Component/ Plugin/ Factory/ FactoryInterface.php, line 8
Namespace
Drupal\Component\Plugin\FactoryView source
interface FactoryInterface {
/**
* Creates a plugin instance based on the provided ID and configuration.
*
* @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.
*
* @throws \Drupal\Component\Plugin\Exception\PluginException
* If the instance cannot be created, such as if the ID is invalid.
*/
public function createInstance($plugin_id, array $configuration = []);
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overrides |
---|---|---|---|---|
FactoryInterface::createInstance | public | function | Creates a plugin instance based on the provided ID and configuration. | 1 |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.