public function DevelDumperPluginManager::createInstance in Devel 8
Same name and namespace in other branches
- 8.3 src/DevelDumperPluginManager.php \Drupal\devel\DevelDumperPluginManager::createInstance()
- 8.2 src/DevelDumperPluginManager.php \Drupal\devel\DevelDumperPluginManager::createInstance()
- 4.x src/DevelDumperPluginManager.php \Drupal\devel\DevelDumperPluginManager::createInstance()
Creates a pre-configured 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.
Throws
\Drupal\Component\Plugin\Exception\PluginException If the instance cannot be created, such as if the ID is invalid.
Overrides PluginManagerBase::createInstance
File
- src/
DevelDumperPluginManager.php, line 57
Class
- DevelDumperPluginManager
- Plugin type manager for Devel Dumper plugins.
Namespace
Drupal\develCode
public function createInstance($plugin_id, array $configuration = []) {
if (!$this
->isPluginSupported($plugin_id)) {
$plugin_id = $this
->getFallbackPluginId($plugin_id);
}
return parent::createInstance($plugin_id, $configuration);
}