You are here

class GridStackDefault in GridStack 8

Same name and namespace in other branches
  1. 8.2 src/GridStackDefault.php \Drupal\gridstack\GridStackDefault

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

Hierarchy

Expanded class hierarchy of GridStackDefault

See also

FormatterBase::defaultSettings()

StylePluginBase::defineOptions()

3 files declare their use of GridStackDefault
GridStackEntityFormatterBase.php in src/Plugin/Field/FieldFormatter/GridStackEntityFormatterBase.php
GridStackFileFormatterBase.php in src/Plugin/Field/FieldFormatter/GridStackFileFormatterBase.php
GridStackViews.php in src/Plugin/views/style/GridStackViews.php

File

src/GridStackDefault.php, line 13

Namespace

Drupal\gridstack
View source
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;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
BlazyDefault::$alterableSettings private static property The alterable settings.
BlazyDefault::$breakpoints private static property The supported $breakpoints.
BlazyDefault::$instance private static property The current class instance.
BlazyDefault::alterableSettings public function Returns alterable plugin settings to pass the tests.
BlazyDefault::baseImageSettings public static function Returns image-related field formatter and Views settings.
BlazyDefault::baseSettings public static function Returns basic plugin settings.
BlazyDefault::entitySettings public static function Returns sensible default options common for entities lacking of UI.
BlazyDefault::extendedSettings public static function Returns fieldable entity formatter and Views settings.
BlazyDefault::getConstantBreakpoints public static function Returns Blazy specific breakpoints.
BlazyDefault::getInstance public static function Returns the static instance of this class.
BlazyDefault::gridSettings public static function Returns optional grid field formatter and Views settings.
BlazyDefault::itemSettings public static function Returns sensible default html settings to shutup notices when lacking.
BlazyDefault::lazySettings public static function Returns sensible default options common for Views lacking of UI.
BlazyDefault::TAGS constant Defines constant for the supported text tags.
BlazyDefault::themeAttributes public static function Returns additional/ optional blazy theme attributes.
BlazyDefault::themeProperties public static function Returns blazy theme properties, its image and container attributes.
BlazyDefault::uiSettings public static function Returns shared global form settings which should be consumed at formatters.
BlazyDefault::viewsSettings public static function Returns Views specific settings.
GridStackDefault::imageSettings public static function Returns image-related field formatter and Views settings. Overrides BlazyDefault::imageSettings