class BackgroundImageSettingsFullViewportCacheContext in Background Image 8
Same name and namespace in other branches
- 2.x src/Cache/Context/BackgroundImageSettingsFullViewportCacheContext.php \Drupal\background_image\Cache\Context\BackgroundImageSettingsFullViewportCacheContext
- 2.0.x src/Cache/Context/BackgroundImageSettingsFullViewportCacheContext.php \Drupal\background_image\Cache\Context\BackgroundImageSettingsFullViewportCacheContext
Cache context ID: 'background_image.settings.full_viewport'.
Hierarchy
- class \Drupal\background_image\Cache\Context\BackgroundImageBaseCacheContext implements CacheContextInterface
- class \Drupal\background_image\Cache\Context\BackgroundImageSettingsFullViewportCacheContext
Expanded class hierarchy of BackgroundImageSettingsFullViewportCacheContext
1 string reference to 'BackgroundImageSettingsFullViewportCacheContext'
1 service uses BackgroundImageSettingsFullViewportCacheContext
File
- src/
Cache/ Context/ BackgroundImageSettingsFullViewportCacheContext.php, line 8
Namespace
Drupal\background_image\Cache\ContextView source
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;
}
}
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. | |
BackgroundImageSettingsFullViewportCacheContext:: |
public | function |
Returns the string representation of the cache context. Overrides CacheContextInterface:: |
|
BackgroundImageSettingsFullViewportCacheContext:: |
public static | function |
Returns the label of the cache context. Overrides CacheContextInterface:: |