Same filename and directory in other branches
- 8.9.x core/lib/Drupal/Core/Cache/Context/RequestFormatCacheContext.php
- 9 core/lib/Drupal/Core/Cache/Context/RequestFormatCacheContext.php
Namespace
Drupal\Core\Cache\Context
File
core/lib/Drupal/Core/Cache/Context/RequestFormatCacheContext.php
View source
<?php
namespace Drupal\Core\Cache\Context;
use Drupal\Core\Cache\CacheableMetadata;
class RequestFormatCacheContext extends RequestStackCacheContextBase {
public static function getLabel() {
return t('Request format');
}
public function getContext() {
return $this->requestStack
->getCurrentRequest()
->getRequestFormat();
}
public function getCacheableMetadata() {
return new CacheableMetadata();
}
}
Classes