You are here

public static function BlazyDefault::itemSettings in Blazy 8.2

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

Returns sensible default item settings to shutup notices when lacking.

6 calls to BlazyDefault::itemSettings()
Blazy::preprocessBlazy in src/Blazy.php
Prepares variables for blazy.html.twig templates.
BlazyManager::getBlazy in src/BlazyManager.php
Returns the enforced rich media content, or media using theme_blazy().
BlazyManagerTest::testPreprocessBlazy in tests/src/Kernel/BlazyManagerTest.php
Tests building Blazy attributes.
BlazyUnitTest::testPreprocessBlazy in tests/src/Unit/BlazyUnitTest.php
Tests \Drupal\blazy\Blazy::preprocessBlazy.
BlazyUnitTest::todoTestPreRenderImageLightbox in tests/src/Unit/BlazyUnitTest.php
Tests BlazyManager image with lightbox support.

... See full list

File

src/BlazyDefault.php, line 236

Class

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

Namespace

Drupal\blazy

Code

public static function itemSettings() {
  return [
    '_api' => FALSE,
    'bundle' => '',
    'classes' => [],
    'content_url' => '',
    'delta' => 0,
    'embed_url' => '',
    'entity_type_id' => '',
    'extension' => '',
    'image_url' => '',
    'item_id' => 'blazy',
    'lazy_attribute' => 'src',
    'lazy_class' => 'b-lazy',
    'padding_bottom' => '',
    'placeholder_fx' => '',
    'placeholder_ui' => '',
    'player' => FALSE,
    'resimage' => FALSE,
    'scheme' => '',
    'type' => 'image',
    'uri' => '',
    'use_data_uri' => FALSE,
    'use_loading' => TRUE,
    'use_media' => FALSE,
    'height' => NULL,
    'width' => NULL,
  ] + self::htmlSettings();
}