You are here

class ImageAPIOptimizeProcessor in Image Optimize (or ImageAPI Optimize) 8.2

Same name and namespace in other branches
  1. 8.3 src/Annotation/ImageAPIOptimizeProcessor.php \Drupal\imageapi_optimize\Annotation\ImageAPIOptimizeProcessor
  2. 4.x src/Annotation/ImageAPIOptimizeProcessor.php \Drupal\imageapi_optimize\Annotation\ImageAPIOptimizeProcessor

Defines an image optimize processor annotation object.

Plugin Namespace: Plugin\ImageAPIOptimizeProcessor.

For a working example, see \Drupal\imageapi_optimize\Plugin\ImageAPIOptimizeProcessor\reSmushit

Hierarchy

Expanded class hierarchy of ImageAPIOptimizeProcessor

See also

hook_imageapi_optimize_processor_info_alter()

\Drupal\imageapi_optimize\ConfigurableImageAPIOptimizeProcessorInterface

\Drupal\imageapi_optimize\ConfigurableImageAPIOptimizeProcessorBase

\Drupal\imageapi_optimize\ImageAPIOptimizePipelineInterface

\Drupal\imageapi_optimize\ImageAPIOptimizeProcessorBase

\Drupal\imageapi_optimize\ImageAPIOptimizeProcessorManager

Plugin API

3 classes are annotated with ImageAPIOptimizeProcessor
TestProcessorAppendCharacters in tests/module/imageapi_optimize_module_test/src/Plugin/ImageAPIOptimizeProcessor/TestProcessorAppendCharacters.php
Optimizes an image by making it 10 characters longer.
TestProcessorBlackPNG in tests/module/imageapi_optimize_module_test/src/Plugin/ImageAPIOptimizeProcessor/TestProcessorBlackPNG.php
Optimizes an image by making it a 1x1 pixel black PNG.
TestProcessorFailedGreenPNG in tests/module/imageapi_optimize_module_test/src/Plugin/ImageAPIOptimizeProcessor/TestProcessorFailedGreenPNG.php
Optimizes an image by making it a 1x1 pixel green PNG, but then failing.

File

src/Annotation/ImageAPIOptimizeProcessor.php, line 25

Namespace

Drupal\imageapi_optimize\Annotation
View source
class ImageAPIOptimizeProcessor extends Plugin {

  /**
   * The plugin ID.
   *
   * @var string
   */
  public $id;

  /**
   * The human-readable name of the image optimize processor.
   *
   * @ingroup plugin_translatable
   *
   * @var \Drupal\Core\Annotation\Translation
   */
  public $label;

  /**
   * A brief description of the image optimize processor.
   *
   * This will be shown when adding or configuring this image optimize processor.
   *
   * @ingroup plugin_translatable
   *
   * @var \Drupal\Core\Annotation\Translation
   */
  public $description = '';

}

Members

Namesort descending Modifiers Type Description Overrides
ImageAPIOptimizeProcessor::$description public property A brief description of the image optimize processor.
ImageAPIOptimizeProcessor::$id public property The plugin ID.
ImageAPIOptimizeProcessor::$label public property The human-readable name of the image optimize processor.
Plugin::$definition protected property The plugin definition read from the class annotation. 1
Plugin::get public function Gets the value of an annotation. Overrides AnnotationInterface::get 5
Plugin::getClass public function Gets the class of the annotated class. Overrides AnnotationInterface::getClass
Plugin::getId public function Gets the unique ID for this annotated class. Overrides AnnotationInterface::getId
Plugin::getProvider public function Gets the name of the provider of the annotated class. Overrides AnnotationInterface::getProvider
Plugin::parse protected function Parses an annotation into its definition.
Plugin::setClass public function Sets the class of the annotated class. Overrides AnnotationInterface::setClass
Plugin::setProvider public function Sets the name of the provider of the annotated class. Overrides AnnotationInterface::setProvider
Plugin::__construct public function Constructs a Plugin object. 2