You are here

interface LazyInterface in Lazy-load 8.3

Interface for Lazy-load service.

Hierarchy

Expanded class hierarchy of LazyInterface

All classes that implement LazyInterface

1 file declares its use of LazyInterface
LazyForm.php in src/Form/LazyForm.php

File

src/LazyInterface.php, line 8

Namespace

Drupal\lazy
View source
interface LazyInterface {

  /**
   * Get Lazy module settings.
   *
   * @return array
   *   Settings array.
   */
  public function getSettings() : array;

  /**
   * List of available Lazysizes plugins.
   *
   * @return array
   *   Returns an array of all available lazysizes plugins.
   */
  public function getPlugins() : array;

  /**
   * Is Lazy-load enabled?
   *
   * @param array $attributes
   *   Element attributes, specifically for the "class".
   *
   * @return bool
   *   Returns true if the path is not restricted, and skip class is not set.
   *   FALSE otherwise.
   */
  public function isEnabled(array $attributes = []) : bool;

  /**
   * Is lazy-loading allowed for current path?
   *
   * @return bool
   *   Returns TRUE if lazy-loading is allowed for current path.
   */
  public function isPathAllowed() : bool;

}

Members

Namesort descending Modifiers Type Description Overrides
LazyInterface::getPlugins public function List of available Lazysizes plugins. 1
LazyInterface::getSettings public function Get Lazy module settings. 1
LazyInterface::isEnabled public function Is Lazy-load enabled? 1
LazyInterface::isPathAllowed public function Is lazy-loading allowed for current path? 1