You are here

BackgroundImageSettingsBlurTypeCacheContext.php in Background Image 2.0.x

File

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

namespace Drupal\background_image\Cache\Context;


/**
 * Cache context ID: 'background_image.settings.blur.type'.
 */
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;
  }

}

Classes

Namesort descending Description
BackgroundImageSettingsBlurTypeCacheContext Cache context ID: 'background_image.settings.blur.type'.