You are here

BackgroundImageSettingsCacheContext.php in Background Image 2.x

File

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

namespace Drupal\background_image\Cache\Context;


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

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

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

}

Classes

Namesort descending Description
BackgroundImageSettingsCacheContext Cache context ID: 'background_image.settings'.