You are here

class BackgroundImageSettingsBlurTypeCacheContext in Background Image 2.0.x

Same name and namespace in other branches
  1. 8 src/Cache/Context/BackgroundImageSettingsBlurTypeCacheContext.php \Drupal\background_image\Cache\Context\BackgroundImageSettingsBlurTypeCacheContext
  2. 2.x src/Cache/Context/BackgroundImageSettingsBlurTypeCacheContext.php \Drupal\background_image\Cache\Context\BackgroundImageSettingsBlurTypeCacheContext

Cache context ID: 'background_image.settings.blur.type'.

Hierarchy

Expanded class hierarchy of BackgroundImageSettingsBlurTypeCacheContext

1 string reference to 'BackgroundImageSettingsBlurTypeCacheContext'
background_image.services.yml in ./background_image.services.yml
background_image.services.yml
1 service uses BackgroundImageSettingsBlurTypeCacheContext
cache_context.background_image.settings.blur.type in ./background_image.services.yml
Drupal\background_image\Cache\Context\BackgroundImageSettingsBlurTypeCacheContext

File

src/Cache/Context/BackgroundImageSettingsBlurTypeCacheContext.php, line 8

Namespace

Drupal\background_image\Cache\Context
View source
class BackgroundImageSettingsBlurTypeCacheContext extends BackgroundImageBaseCacheContext {

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

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

}

Members

Namesort descending Modifiers Type Description Overrides
BackgroundImageBaseCacheContext::$backgroundImage protected property
BackgroundImageBaseCacheContext::$manager protected property
BackgroundImageBaseCacheContext::getCacheableMetadata public function Gets the cacheability metadata for the context. Overrides CacheContextInterface::getCacheableMetadata
BackgroundImageBaseCacheContext::__construct public function Constructs a BackgroundImageCacheContext object.
BackgroundImageSettingsBlurTypeCacheContext::getContext public function Returns the string representation of the cache context. Overrides CacheContextInterface::getContext
BackgroundImageSettingsBlurTypeCacheContext::getLabel public static function Returns the label of the cache context. Overrides CacheContextInterface::getLabel