class BackgroundImageSettingsDarkCacheContext in Background Image 8
Same name and namespace in other branches
- 2.x src/Cache/Context/BackgroundImageSettingsDarkCacheContext.php \Drupal\background_image\Cache\Context\BackgroundImageSettingsDarkCacheContext
- 2.0.x src/Cache/Context/BackgroundImageSettingsDarkCacheContext.php \Drupal\background_image\Cache\Context\BackgroundImageSettingsDarkCacheContext
Cache context ID: 'background_image.settings.dark'.
Hierarchy
- class \Drupal\background_image\Cache\Context\BackgroundImageBaseCacheContext implements CacheContextInterface
- class \Drupal\background_image\Cache\Context\BackgroundImageSettingsDarkCacheContext
Expanded class hierarchy of BackgroundImageSettingsDarkCacheContext
1 string reference to 'BackgroundImageSettingsDarkCacheContext'
1 service uses BackgroundImageSettingsDarkCacheContext
File
- src/
Cache/ Context/ BackgroundImageSettingsDarkCacheContext.php, line 8
Namespace
Drupal\background_image\Cache\ContextView source
class BackgroundImageSettingsDarkCacheContext extends BackgroundImageBaseCacheContext {
/**
* {@inheritdoc}
*/
public static function getLabel() {
return t('Background Image: Dark Setting');
}
/**
* {@inheritdoc}
*/
public function getContext() {
return $this->backgroundImage ? $this->backgroundImage
->getSetting('dark') : 0;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BackgroundImageBaseCacheContext:: |
protected | property | ||
BackgroundImageBaseCacheContext:: |
protected | property | ||
BackgroundImageBaseCacheContext:: |
public | function |
Gets the cacheability metadata for the context. Overrides CacheContextInterface:: |
|
BackgroundImageBaseCacheContext:: |
public | function | Constructs a BackgroundImageCacheContext object. | |
BackgroundImageSettingsDarkCacheContext:: |
public | function |
Returns the string representation of the cache context. Overrides CacheContextInterface:: |
|
BackgroundImageSettingsDarkCacheContext:: |
public static | function |
Returns the label of the cache context. Overrides CacheContextInterface:: |