You are here

interface ImageStylesWarmerInterface in Image Style Warmer 8

Provides an interface defining an image styles warmer.

Hierarchy

Expanded class hierarchy of ImageStylesWarmerInterface

All classes that implement ImageStylesWarmerInterface

2 files declare their use of ImageStylesWarmerInterface
ImageStylesPregenerator.php in src/Plugin/QueueWorker/ImageStylesPregenerator.php
ImageStyleWarmer.php in src/Plugin/Action/ImageStyleWarmer.php

File

src/ImageStylesWarmerInterface.php, line 10

Namespace

Drupal\image_style_warmer
View source
interface ImageStylesWarmerInterface {

  /**
   * Init warm up with configured image styles for an image file.
   *
   * @param \Drupal\file\FileInterface $file
   *   The file for which image styles should be created.
   */
  public function warmUp(FileInterface $file);

  /**
   * Do warm up of image styles for an image file.
   *
   * @param \Drupal\file\FileInterface $file
   *   The file for which image styles should be created.
   * @param array $image_styles
   *   List of image styles machine names.
   */
  public function doWarmUp(FileInterface $file, array $image_styles);

  /**
   * Initial warm up of images style from a file.
   *
   * @param \Drupal\file\FileInterface $file
   *   The file for which image styles should be created.
   *
   * @deprecated
   *   Will be removed in upcoming RC release. Please use doWarmUp() instead.
   */
  public function initialWarmUp(FileInterface $file);

  /**
   * Queue warm up of images style from a file.
   *
   * @param \Drupal\file\FileInterface $file
   *   The file for which image styles should be created.
   *
   * @deprecated
   *   Will be removed in upcoming RC release. Please use addQueue() instead.
   */
  public function queueWarmUp(FileInterface $file);

  /**
   * Add file and image styles to ImageStylesPregenerator queue.
   *
   * @param \Drupal\file\FileInterface $file
   *   The file for which image styles should be created.
   * @param array $image_styles
   *   List of image styles machine names.
   */
  public function addQueue(FileInterface $file, array $image_styles);

  /**
   * Validate file as an image file.
   *
   * @param \Drupal\file\FileInterface $file
   *   The file for which image styles should be created.
   */
  public function validateImage(FileInterface $file);

}

Members

Namesort descending Modifiers Type Description Overrides
ImageStylesWarmerInterface::addQueue public function Add file and image styles to ImageStylesPregenerator queue. 1
ImageStylesWarmerInterface::doWarmUp public function Do warm up of image styles for an image file. 1
ImageStylesWarmerInterface::initialWarmUp Deprecated public function Initial warm up of images style from a file. 1
ImageStylesWarmerInterface::queueWarmUp Deprecated public function Queue warm up of images style from a file. 1
ImageStylesWarmerInterface::validateImage public function Validate file as an image file. 1
ImageStylesWarmerInterface::warmUp public function Init warm up with configured image styles for an image file. 1