public function ImageToolkitOperationManager::getToolkitOperation in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/ImageToolkit/ImageToolkitOperationManager.php \Drupal\Core\ImageToolkit\ImageToolkitOperationManager::getToolkitOperation()
Returns a toolkit operation plugin instance.
Parameters
\Drupal\Core\ImageToolkit\ImageToolkitInterface $toolkit: The toolkit instance.
string $operation: The operation (e.g. "crop").
Return value
\Drupal\Core\ImageToolkit\ImageToolkitOperationInterface An instance of the requested toolkit operation plugin.
Throws
\Drupal\Component\Plugin\Exception\PluginNotFoundException When no plugin is available.
Overrides ImageToolkitOperationManagerInterface::getToolkitOperation
File
- core/
lib/ Drupal/ Core/ ImageToolkit/ ImageToolkitOperationManager.php, line 104 - Contains \Drupal\Core\ImageToolkit\ImageToolkitOperationManager.
Class
- ImageToolkitOperationManager
- Manages toolkit operation plugins.
Namespace
Drupal\Core\ImageToolkitCode
public function getToolkitOperation(ImageToolkitInterface $toolkit, $operation) {
$plugin_id = $this
->getToolkitOperationPluginId($toolkit
->getPluginId(), $operation);
return $this
->createInstance($plugin_id, array(), $toolkit);
}