ImageToolkitOperationManager::createInstance

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 th

ImageToolkitOperationManager::$toolkitManager

The image toolkit manager. Type: \Drupal\Core\ImageToolkit\ImageToolkitManager File core/lib/Drupal/Core/ImageToolkit/ImageToolkitOperationManager.php, line 35 Class ImageToolkitOperationManager Manages toolkit operation plugins. Namespace Drupal\Core\ImageToolkit Code protected $toolkitManager;

ImageToolkitOperationManager::$logger

A logger instance. Type: \Psr\Log\LoggerInterface File core/lib/Drupal/Core/ImageToolkit/ImageToolkitOperationManager.php, line 28 Class ImageToolkitOperationManager Manages toolkit operation plugins. Namespace Drupal\Core\ImageToolkit Code protected $logger;

ImageToolkitOperationManager

Manages toolkit operation plugins. Hierarchy class \Drupal\Component\Plugin\PluginManagerBase implements PluginManagerInterface uses DiscoveryTraitclass \Drupal\Core\Plugin\DefaultPluginManager implements CachedDiscoveryInterface, PluginManagerInterface, CacheableDependencyInterface uses DiscoveryCachedTrait, UseCacheBackendTraitclass \Drupal\Core\ImageToolkit\ImageToolkitOperationManager implements ImageToolkitOperationManagerInterface See also \Drupal\Core\ImageToolkit\Annotation\ImageT

ImageToolkitOperationInterface::apply

public ImageToolkitOperationInterface::apply(array $arguments) Applies a toolkit specific operation to an image. Parameters array $arguments: An associative array of data to be used by the toolkit operation. Return value bool TRUE if the operation was performed successfully, FALSE otherwise. Throws \InvalidArgumentException If one or more of the arguments are not valid. File core/lib/Drupal/Core/ImageToolkit/ImageToolkitOperationInterface.php, line 33 Class ImageToolkitOperationInterface

ImageToolkitOperationInterface

Defines an interface for image toolkit operations. An image toolkit operation plugin provides a self-contained image manipulation routine, for a specific image toolkit. Examples of image toolkit operations are scaling, cropping, rotating, etc. Hierarchy interface \Drupal\Component\Plugin\PluginInspectionInterfaceinterface \Drupal\Core\ImageToolkit\ImageToolkitOperationInterface See also \Drupal\Core\ImageToolkit\Annotation\ImageToolkitOperation \Drupal\Core\ImageToolkit\ImageToolkitOperati

ImageToolkitOperationBase::__construct

public ImageToolkitOperationBase::__construct(array $configuration, $plugin_id, array $plugin_definition, ImageToolkitInterface $toolkit, LoggerInterface $logger) Constructs an image toolkit operation plugin. Parameters array $configuration: A configuration array containing information about the plugin instance. string $plugin_id: The plugin_id for the plugin instance. array $plugin_definition: The plugin implementation definition. \Drupal\Core\ImageToolkit\ImageToolkitInterface $toolkit: The

ImageToolkitOperationBase::validateArguments

protected ImageToolkitOperationBase::validateArguments(array $arguments) Validates the arguments. Image toolkit operation implementers should place any argument validation in this method, throwing an InvalidArgumentException when an error is encountered. Validation typically includes things like: Checking that width and height are not negative. Checking that a color value is indeed a color. But validation may also include correcting the arguments, e.g: Casting arguments to the correct type. R

ImageToolkitOperationBase::prepareArguments

protected ImageToolkitOperationBase::prepareArguments(array $arguments) Checks if required arguments are passed in and adds defaults for non passed in optional arguments. Image toolkit operation implementers should not normally need to override this method as they should place their own validation in validateArguments. Parameters array $arguments: An associative array of arguments to be used by the toolkit operation. Return value array The prepared arguments array. Throws \InvalidArgumentExc

ImageToolkitOperationBase::getToolkit

protected ImageToolkitOperationBase::getToolkit() Returns the image toolkit instance for this operation. Image toolkit implementers should provide a toolkit operation base class that overrides this method to correctly document the return type of this getter. This provides better DX (code checking and code completion) for image toolkit operation developers. Return value \Drupal\Core\ImageToolkit\ImageToolkitInterface File core/lib/Drupal/Core/ImageToolkit/ImageToolkitOperationBase.php, line 63