You are here

public function BlazyManagerInterface::isBlazy in Blazy 7

Same name and namespace in other branches
  1. 8.2 src/BlazyManagerInterface.php \Drupal\blazy\BlazyManagerInterface::isBlazy()

Checks for Blazy formatter such as from within a Views style plugin.

Ensures the settings traverse up to the container where Blazy is clueless. The supported plugins can add [data-blazy] attribute into its container containing $settings['blazy_data'] converted into [data-blazy] JSON. This allows Blazy Grid, or other Views styles, lacking of UI, to have additional settings extracted from the first Blazy formatter found. Such as media switch/ lightbox. This way the container can add relevant attributes to its container, etc. Also applies to entity references where Blazy is not the main formatter, instead embedded as part of the parent's.

Parameters

array $settings: The settings being modified.

array $item: The item containing settings or item keys, not image item.

1 method overrides BlazyManagerInterface::isBlazy()
BlazyManagerBase::isBlazy in src/BlazyManagerBase.php
Checks for Blazy formatter such as from within a Views style plugin.

File

src/BlazyManagerInterface.php, line 54

Class

BlazyManagerInterface
Defines re-usable services and functions for blazy plugins.

Namespace

Drupal\blazy

Code

public function isBlazy(array &$settings, array $item = []);