3 namespace Drupal\blazy\Dejavu;
6 * Defines shared plugin default settings for field formatter and Views style.
8 * @todo: Consider moving this into Drupal\blazy namespace.
13 * The supported $breakpoints.
17 private static $breakpoints = ['xs', 'sm', 'md', 'lg', 'xl'];
20 * Returns Blazy specific breakpoints.
22 public static function getConstantBreakpoints() {
23 return self::$breakpoints;
27 * Returns basic plugin settings.
29 public static function baseSettings() {
32 'current_view_mode' => '',
33 'optionset' => 'default',
40 * Returns image-related field formatter and Views settings.
42 public static function baseImageSettings() {
44 'background' => FALSE,
46 'box_caption_custom' => '',
48 'box_media_style' => '',
54 'responsive_image_style' => '',
60 * Returns image-related field formatter and Views settings.
62 public static function imageSettings() {
64 'iframe_lazy' => TRUE,
67 'thumbnail_style' => '',
69 ] + self::baseSettings() + self::baseImageSettings();
73 * Returns Views specific settings.
75 public static function viewsSettings() {
88 * Returns fieldable entity formatter and Views settings.
90 public static function extendedSettings() {
91 return self::viewsSettings() + self::imageSettings();
95 * Returns optional grid field formatter and Views settings.
97 public static function gridSettings() {
108 * Returns sensible default options common for entities lacking of UI.
110 public static function entitySettings() {
113 'iframe_lazy' => TRUE,
115 'media_switch' => 'media',
118 'view_mode' => 'default',