You are here

public static function BlazyDefault::itemSettings in Blazy 8

Same name and namespace in other branches
  1. 8.2 src/BlazyDefault.php \Drupal\blazy\BlazyDefault::itemSettings()
  2. 7 src/BlazyDefault.php \Drupal\blazy\BlazyDefault::itemSettings()

Returns sensible default html settings to shutup notices when lacking.

8 calls to BlazyDefault::itemSettings()
Blazy::buildAttributes in src/Blazy.php
Prepares variables for blazy.html.twig templates.
BlazyManager::getBlazy in src/BlazyManager.php
Returns the enforced content, or image using theme_blazy().
BlazyManagerTest::testBlazyManagerMethods in tests/src/Kernel/BlazyManagerTest.php
Tests cases for various methods.
BlazyManagerTest::testBuildAttributes in tests/src/Kernel/BlazyManagerTest.php
Tests building Blazy attributes.
BlazyManagerTest::testPreRenderImage in tests/src/Kernel/BlazyManagerTest.php
Tests BlazyManager image.

... See full list

File

src/BlazyDefault.php, line 189

Class

BlazyDefault
Defines shared plugin default settings for field formatter and Views style.

Namespace

Drupal\blazy

Code

public static function itemSettings() {
  return [
    'blazy_data' => [],
    'classes' => [],
    'content_url' => '',
    'delta' => 0,
    'embed_url' => '',
    'entity_type_id' => '',
    'extension' => '',
    'icon' => '',
    'image_url' => '',
    'id' => '',
    'item_id' => 'blazy',
    'lazy_attribute' => 'src',
    'lazy_class' => 'b-lazy',
    'lightbox' => FALSE,
    'namespace' => 'blazy',
    'player' => FALSE,
    'scheme' => '',
    'type' => 'image',
    'uri' => '',
    'use_image' => FALSE,
    'use_media' => FALSE,
    'height' => NULL,
    'width' => NULL,
  ] + self::imageSettings() + self::uiSettings();
}