diff --git a/core/core.services.yml b/core/core.services.yml index 21339b4..5b0de75 100644 --- a/core/core.services.yml +++ b/core/core.services.yml @@ -93,8 +93,8 @@ services: arguments: ['@request_stack'] tags: - { name: cache.context } - cache_context.url.path.front_page: - class: Drupal\Core\Cache\Context\PathIsFrontPageCacheContext + cache_context.url.path.is_front: + class: Drupal\Core\Cache\Context\IsFrontPathCacheContext arguments: ['@path.matcher'] tags: - { name: cache.context } diff --git a/core/lib/Drupal/Core/Cache/Context/IsFrontPathCacheContext.php b/core/lib/Drupal/Core/Cache/Context/IsFrontPathCacheContext.php index 28cdf39..f202c92 100644 --- a/core/lib/Drupal/Core/Cache/Context/IsFrontPathCacheContext.php +++ b/core/lib/Drupal/Core/Cache/Context/IsFrontPathCacheContext.php @@ -7,11 +7,11 @@ use Drupal\Core\Path\PathMatcherInterface; /** - * Defines the front page cache context. + * Defines an 'is front' path cache context. * - * Cache context ID: 'url.path.front_page'. + * Cache context ID: 'url.path.is_front'. */ -class PathIsFrontPageCacheContext implements CacheContextInterface { +class IsFrontPathCacheContext implements CacheContextInterface { /** * @var \Drupal\Core\Path\PathMatcherInterface @@ -19,7 +19,7 @@ class PathIsFrontPageCacheContext implements CacheContextInterface { protected $pathMatcher; /** - * Constructs a PathIsFrontPageCacheContext object. + * Constructs a IsFrontPathCacheContext object. * * @param \Drupal\Core\Path\PathMatcherInterface $path_matcher */ diff --git a/core/tests/Drupal/Tests/Core/Cache/Context/IsFrontPathCacheContextTest.php b/core/tests/Drupal/Tests/Core/Cache/Context/IsFrontPathCacheContextTest.php index e474c1f..77500bd 100644 --- a/core/tests/Drupal/Tests/Core/Cache/Context/IsFrontPathCacheContextTest.php +++ b/core/tests/Drupal/Tests/Core/Cache/Context/IsFrontPathCacheContextTest.php @@ -10,7 +10,7 @@ * @coversDefaultClass \Drupal\Core\Cache\Context\IsFrontPathCacheContext * @group Cache */ -class PathIsFrontPageCacheContextTest extends UnitTestCase { +class IsFrontPathCacheContextTest extends UnitTestCase { /** * @covers ::getContext