public function TypeProcessorPluginManager::createInstance in Content Synchronizer 8
Same name and namespace in other branches
- 8.2 src/Processors/Type/TypeProcessorPluginManager.php \Drupal\content_synchronizer\Processors\Type\TypeProcessorPluginManager::createInstance()
- 3.x src/Processors/Type/TypeProcessorPluginManager.php \Drupal\content_synchronizer\Processors\Type\TypeProcessorPluginManager::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
1 call to TypeProcessorPluginManager::createInstance()
- TypeProcessorPluginManager::getInstanceByFieldType in src/
Processors/ Type/ TypeProcessorPluginManager.php - Return the plugin by field type.
File
- src/
Processors/ Type/ TypeProcessorPluginManager.php, line 48
Class
- TypeProcessorPluginManager
- The type processor manager.
Namespace
Drupal\content_synchronizer\Processors\TypeCode
public function createInstance($plugin_id, array $configuration = []) {
if (!array_key_exists($plugin_id, static::$instances)) {
static::$instances[$plugin_id] = parent::createInstance($plugin_id, $configuration);
}
return static::$instances[$plugin_id];
}