class SecureLoginCacheContext in Secure Login 8
Defines the SecureLoginCacheContext service for "per request URL" caching.
Cache context ID: 'securelogin'.
Hierarchy
- class \Drupal\Core\Cache\Context\RequestStackCacheContextBase
- class \Drupal\Core\Cache\Context\UrlCacheContext implements CacheContextInterface
- class \Drupal\securelogin\SecureLoginCacheContext
- class \Drupal\Core\Cache\Context\UrlCacheContext implements CacheContextInterface
Expanded class hierarchy of SecureLoginCacheContext
1 string reference to 'SecureLoginCacheContext'
1 service uses SecureLoginCacheContext
File
- src/
SecureLoginCacheContext.php, line 12
Namespace
Drupal\secureloginView source
class SecureLoginCacheContext extends UrlCacheContext {
/**
* {@inheritdoc}
*/
public static function getLabel() {
return t('Secure login');
}
/**
* {@inheritdoc}
*/
public function getContext() {
return $this->requestStack
->getMasterRequest()
->getUri();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
RequestStackCacheContextBase:: |
protected | property | The request stack. | |
RequestStackCacheContextBase:: |
public | function | Constructs a new RequestStackCacheContextBase class. | |
SecureLoginCacheContext:: |
public | function |
Returns the string representation of the cache context. Overrides UrlCacheContext:: |
|
SecureLoginCacheContext:: |
public static | function |
Returns the label of the cache context. Overrides UrlCacheContext:: |
|
UrlCacheContext:: |
public | function |
Gets the cacheability metadata for the context. Overrides CacheContextInterface:: |