You are here

interface ImageAPIOptimizeProcessorInterface in Image Optimize (or ImageAPI Optimize) 8.3

Same name and namespace in other branches
  1. 8.2 src/ImageAPIOptimizeProcessorInterface.php \Drupal\imageapi_optimize\ImageAPIOptimizeProcessorInterface
  2. 4.x src/ImageAPIOptimizeProcessorInterface.php \Drupal\imageapi_optimize\ImageAPIOptimizeProcessorInterface

Defines the interface for image optimize processors.

Hierarchy

Expanded class hierarchy of ImageAPIOptimizeProcessorInterface

All classes that implement ImageAPIOptimizeProcessorInterface

See also

\Drupal\imageapi_optimize\Annotation\ImageAPIOptimizeProcessor

\Drupal\imageapi_optimize\ImageAPIOptimizeProcessorBase

\Drupal\imageapi_optimize\ConfigurableImageAPIOptimizeProcessorInterface

\Drupal\imageapi_optimize\ConfigurableImageAPIOptimizeProcessorBase

\Drupal\imageapi_optimize\ImageAPIOptimizeProcessorManager

Plugin API

1 file declares its use of ImageAPIOptimizeProcessorInterface
ImageAPIOptimizePipeline.php in src/Entity/ImageAPIOptimizePipeline.php

File

src/ImageAPIOptimizeProcessorInterface.php, line 19

Namespace

Drupal\imageapi_optimize
View source
interface ImageAPIOptimizeProcessorInterface extends PluginInspectionInterface, ConfigurableInterface, DependentPluginInterface {

  /**
   * Returns a render array summarizing the configuration of the image optimize processor.
   *
   * @return array
   *   A render array.
   */
  public function getSummary();

  /**
   * Returns the image optimize processor label.
   *
   * @return string
   *   The image optimize processor label.
   */
  public function label();

  /**
   * Returns the unique ID representing the image optimize processor.
   *
   * @return string
   *   The image optimize processor ID.
   */
  public function getUuid();

  /**
   * Returns the weight of the image optimize processor.
   *
   * @return int|string
   *   Either the integer weight of the image optimize processor, or an empty string.
   */
  public function getWeight();

  /**
   * Sets the weight for this image optimize processor.
   *
   * @param int $weight
   *   The weight for this image optimize processor.
   *
   * @return $this
   */
  public function setWeight($weight);

  /**
   * Apply this image optimize processor to the given image.
   *
   * Image processors should modify the file in-place or overwrite the file on
   * disk with an optimized version.
   *
   * @param string $image_uri
   *   Original image file URI.
   *
   * @return bool
   *   TRUE if an optimized image was generated, or FALSE if the image
   *   could not be optimized.
   */
  public function applyToImage($image_uri);

}

Members

Namesort descending Modifiers Type Description Overrides
ConfigurableInterface::defaultConfiguration public function Gets default configuration for this plugin. 11
ConfigurableInterface::getConfiguration public function Gets this plugin's configuration. 12
ConfigurableInterface::setConfiguration public function Sets the configuration for this plugin instance. 12
DependentPluginInterface::calculateDependencies public function Calculates dependencies for the configured plugin. 19
ImageAPIOptimizeProcessorInterface::applyToImage public function Apply this image optimize processor to the given image. 3
ImageAPIOptimizeProcessorInterface::getSummary public function Returns a render array summarizing the configuration of the image optimize processor. 1
ImageAPIOptimizeProcessorInterface::getUuid public function Returns the unique ID representing the image optimize processor. 1
ImageAPIOptimizeProcessorInterface::getWeight public function Returns the weight of the image optimize processor. 1
ImageAPIOptimizeProcessorInterface::label public function Returns the image optimize processor label. 1
ImageAPIOptimizeProcessorInterface::setWeight public function Sets the weight for this image optimize processor. 1
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 4
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance. 2