public ImageToolkitOperationManager::createInstance($plugin_id, array $configuration = array(), ImageToolkitInterface $toolkit = NULL)
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
- core/lib/Drupal/Core/ImageToolkit/ImageToolkitOperationManager.php, line 109
Class
- ImageToolkitOperationManager
- Manages toolkit operation plugins.
Namespace
Drupal\Core\ImageToolkit
Code
public function createInstance($plugin_id, array $configuration = array(), ImageToolkitInterface $toolkit = NULL) { $plugin_definition = $this->getDefinition($plugin_id); $plugin_class = DefaultFactory::getPluginClass($plugin_id, $plugin_definition); return new $plugin_class($configuration, $plugin_id, $plugin_definition, $toolkit, $this->logger); }
Please login to continue.