You are here

BackgroundImageSettingsFullViewportCacheContext.php in Background Image 2.0.x

File

src/Cache/Context/BackgroundImageSettingsFullViewportCacheContext.php
View source
<?php

namespace Drupal\background_image\Cache\Context;


/**
 * Cache context ID: 'background_image.settings.full_viewport'.
 */
class BackgroundImageSettingsFullViewportCacheContext extends BackgroundImageBaseCacheContext {

  /**
   * {@inheritdoc}
   */
  public static function getLabel() {
    return t('Background Image: Full Viewport Setting');
  }

  /**
   * {@inheritdoc}
   */
  public function getContext() {
    return $this->backgroundImage ? $this->backgroundImage
      ->getSetting('full_viewport') : 0;
  }

}

Classes

Namesort descending Description
BackgroundImageSettingsFullViewportCacheContext Cache context ID: 'background_image.settings.full_viewport'.