function ImageToolkitOperationManager::createInstance

Same name in other branches
  1. 9 core/lib/Drupal/Core/ImageToolkit/ImageToolkitOperationManager.php \Drupal\Core\ImageToolkit\ImageToolkitOperationManager::createInstance()
  2. 8.9.x core/lib/Drupal/Core/ImageToolkit/ImageToolkitOperationManager.php \Drupal\Core\ImageToolkit\ImageToolkitOperationManager::createInstance()
  3. 10 core/lib/Drupal/Core/ImageToolkit/ImageToolkitOperationManager.php \Drupal\Core\ImageToolkit\ImageToolkitOperationManager::createInstance()

Overrides PluginManagerBase::createInstance

1 call to ImageToolkitOperationManager::createInstance()
ImageToolkitOperationManager::getToolkitOperation in core/lib/Drupal/Core/ImageToolkit/ImageToolkitOperationManager.php
Returns a toolkit operation plugin instance.

File

core/lib/Drupal/Core/ImageToolkit/ImageToolkitOperationManager.php, line 117

Class

ImageToolkitOperationManager
Manages toolkit operation plugins.

Namespace

Drupal\Core\ImageToolkit

Code

public function createInstance($plugin_id, array $configuration = [], ?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);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.