You are here

GridStackDefault.php in GridStack 8

Same filename and directory in other branches
  1. 8.2 src/GridStackDefault.php

Namespace

Drupal\gridstack

File

src/GridStackDefault.php
View source
<?php

namespace Drupal\gridstack;

use Drupal\blazy\Dejavu\BlazyDefault;

/**
 * Defines shared plugin default settings for field formatter and Views style.
 *
 * @see FormatterBase::defaultSettings()
 * @see StylePluginBase::defineOptions()
 */
class GridStackDefault extends BlazyDefault {

  /**
   * Returns image-related field formatter and Views settings.
   */
  public static function imageSettings() {
    $settings = parent::imageSettings();
    foreach ([
      'breakpoints',
      'responsive_image_style',
      'sizes',
    ] as $key) {
      unset($settings[$key]);
    }
    return [
      'background' => TRUE,
    ] + $settings;
  }

}

Classes

Namesort descending Description
GridStackDefault Defines shared plugin default settings for field formatter and Views style.