You are here

interface BlazyFilterInterface in Blazy 8.2

Same name and namespace in other branches
  1. 7 src/Plugin/Filter/BlazyFilterInterface.php \Drupal\blazy\Plugin\Filter\BlazyFilterInterface

Defines re-usable services and functions for blazy plugins.

Hierarchy

Expanded class hierarchy of BlazyFilterInterface

All classes that implement BlazyFilterInterface

File

src/Plugin/Filter/BlazyFilterInterface.php, line 8

Namespace

Drupal\blazy\Plugin\Filter
View source
interface BlazyFilterInterface {

  /**
   * Returns the main settings.
   *
   * @param string $text
   *   The provided text.
   *
   * @return array
   *   The main settings for current filter.
   */
  public function buildSettings($text);

  /**
   * Cleanups invalid nodes or those of which their contents are moved.
   *
   * @param \DOMDocument $dom
   *   The HTML DOM object being modified.
   */
  public function cleanupNodes(\DOMDocument &$dom);

  /**
   * Build the grid.
   *
   * @param \DOMDocument $dom
   *   The HTML DOM object being modified.
   * @param array $settings
   *   The settings array.
   * @param array $elements
   *   The renderable array of blazy item.
   * @param array $grid_nodes
   *   The grid nodes.
   */
  public function buildGrid(\DOMDocument &$dom, array &$settings, array $elements = [], array $grid_nodes = []);

  /**
   * Returns the faked image item for the image, uploaded or hard-coded.
   *
   * @param array $build
   *   The content array being modified.
   * @param object $node
   *   The HTML DOM object.
   */
  public function buildImageItem(array &$build, &$node);

  /**
   * Gets the caption if available.
   *
   * @param array $build
   *   The content array being modified.
   * @param object $node
   *   The HTML DOM object.
   */
  public function buildImageCaption(array &$build, &$node);

  /**
   * Returns the faked image item from SRC.
   *
   * @param array $settings
   *   The content array being modified.
   * @param object $node
   *   The HTML DOM object.
   * @param string $src
   *   The corrected SRC value.
   *
   * @return object
   *   The faked or file entity image item.
   */
  public function getImageItemFromImageSrc(array &$settings, $node, $src);

  /**
   * Returns the faked image item from SRC.
   *
   * @param array $settings
   *   The content array being modified.
   * @param object $node
   *   The HTML DOM object.
   * @param string $src
   *   The corrected SRC value.
   *
   * @return object
   *   The faked or file entity image item.
   */
  public function getImageItemFromIframeSrc(array &$settings, &$node, $src);

  /**
   * Returns the item settings for the current $node.
   *
   * @param array $settings
   *   The settings being modified.
   * @param object $node
   *   The HTML DOM object.
   */
  public function buildItemSettings(array &$settings, $node);

}

Members

Namesort descending Modifiers Type Description Overrides
BlazyFilterInterface::buildGrid public function Build the grid. 1
BlazyFilterInterface::buildImageCaption public function Gets the caption if available. 1
BlazyFilterInterface::buildImageItem public function Returns the faked image item for the image, uploaded or hard-coded. 1
BlazyFilterInterface::buildItemSettings public function Returns the item settings for the current $node. 1
BlazyFilterInterface::buildSettings public function Returns the main settings. 1
BlazyFilterInterface::cleanupNodes public function Cleanups invalid nodes or those of which their contents are moved. 1
BlazyFilterInterface::getImageItemFromIframeSrc public function Returns the faked image item from SRC. 1
BlazyFilterInterface::getImageItemFromImageSrc public function Returns the faked image item from SRC. 1