diff --git a/core/modules/rest/src/Plugin/views/display/RestExport.php b/core/modules/rest/src/Plugin/views/display/RestExport.php index d3dc72d..65bce23 100644 --- a/core/modules/rest/src/Plugin/views/display/RestExport.php +++ b/core/modules/rest/src/Plugin/views/display/RestExport.php @@ -435,7 +435,7 @@ public function render() { $build['#markup'] = ViewsRenderPipelineMarkup::create($build['#markup']); } - parent::applyDisplayCacheablityMetadata($build); + parent::applyDisplayCacheabilityMetadata($build); return $build; } diff --git a/core/modules/user/src/Tests/Views/AccessRoleTest.php b/core/modules/user/src/Tests/Views/AccessRoleTest.php index cd76f31..2462915 100644 --- a/core/modules/user/src/Tests/Views/AccessRoleTest.php +++ b/core/modules/user/src/Tests/Views/AccessRoleTest.php @@ -126,7 +126,7 @@ public function testRenderCaching() { $account_switcher->switchTo($this->webUser); $result = $renderer->renderPlain($build); // @todo Fix this in https://www.drupal.org/node/2551037, - // DisplayPluginBase::applyDisplayCacheablityMetadata() is not invoked when + // DisplayPluginBase::applyDisplayCacheabilityMetadata() is not invoked when // using buildBasicRenderable() and a Views access plugin returns FALSE. //$this->assertTrue(in_array('user.roles', $build['#cache']['contexts'])); //$this->assertEqual([], $build['#cache']['tags']); diff --git a/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php index a2cdc77..dc7edd4 100644 --- a/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php +++ b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php @@ -2114,7 +2114,7 @@ public function render() { '#attached' => &$this->view->element['#attached'], ); - $this->applyDisplayCacheablityMetadata($this->view->element); + $this->applyDisplayCacheabilityMetadata($this->view->element); return $element; } @@ -2125,7 +2125,7 @@ public function render() { * @param array $element * The render array with updated cacheability metadata. */ - protected function applyDisplayCacheablityMetadata(array &$element) { + protected function applyDisplayCacheabilityMetadata(array &$element) { /** @var \Drupal\views\Plugin\views\cache\CachePluginBase $cache */ $cache = $this->getPlugin('cache'); @@ -2143,11 +2143,13 @@ protected function applyDisplayCacheablityMetadata(array &$element) { * @param array $element * The render array with updated cacheability metadata. * - * @deprecated in Drupal 8.2.x-dev, will be removed before Drupal 8.4.0. Use - * ::applyDisplayCacheablityMetadata() instead. + * @deprecated in Drupal 8.2.x-dev, will be removed before Drupal 9.0. Use + * DisplayPluginBase::applyDisplayCacheabilityMetadata instead. + * + * @see \Drupal\views\Plugin\views\display\DisplayPluginBase::applyDisplayCacheabilityMetadata() */ protected function applyDisplayCachablityMetadata(array &$element) { - $this->applyDisplayCacheablityMetadata($element); + DisplayPluginBase::applyDisplayCacheabilityMetadata($element); } /** @@ -2342,7 +2344,7 @@ public function buildRenderable(array $args = [], $cache = TRUE) { // of cacheability metadata (e.g.: cache contexts), so they can bubble up. // Thus, we add the cacheability metadata first, then modify / remove the // cache keys depending on the $cache argument. - $this->applyDisplayCacheablityMetadata($this->view->element); + $this->applyDisplayCacheabilityMetadata($this->view->element); if ($cache) { $this->view->element['#cache'] += ['keys' => []]; // Places like \Drupal\views\ViewExecutable::setCurrentPage() set up an diff --git a/core/modules/views/src/Plugin/views/display/Feed.php b/core/modules/views/src/Plugin/views/display/Feed.php index 9b234af..35da245 100644 --- a/core/modules/views/src/Plugin/views/display/Feed.php +++ b/core/modules/views/src/Plugin/views/display/Feed.php @@ -106,7 +106,7 @@ public function preview() { public function render() { $build = $this->view->style_plugin->render($this->view->result); - $this->applyDisplayCacheablityMetadata($build); + $this->applyDisplayCacheabilityMetadata($build); return $build; } diff --git a/core/tests/Drupal/Tests/Core/Menu/LocalTaskManagerTest.php b/core/tests/Drupal/Tests/Core/Menu/LocalTaskManagerTest.php index 5fc65ad..2708c0c 100644 --- a/core/tests/Drupal/Tests/Core/Menu/LocalTaskManagerTest.php +++ b/core/tests/Drupal/Tests/Core/Menu/LocalTaskManagerTest.php @@ -413,7 +413,7 @@ public function testGetTasksBuildWithCacheabilityMetadata() { ->method('getDefinitions') ->will($this->returnValue($definitions)); - // Set up some cacheablity metadata and ensure its merged together. + // Set up some cacheability metadata and ensure its merged together. $definitions['menu_local_task_test_tasks_settings']['cache_tags'] = ['tag.example1']; $definitions['menu_local_task_test_tasks_settings']['cache_contexts'] = ['context.example1']; $definitions['menu_local_task_test_tasks_edit']['cache_tags'] = ['tag.example2']; diff --git a/core/tests/Drupal/Tests/Core/Render/RendererTest.php b/core/tests/Drupal/Tests/Core/Render/RendererTest.php index 51cfde8..cea677b 100644 --- a/core/tests/Drupal/Tests/Core/Render/RendererTest.php +++ b/core/tests/Drupal/Tests/Core/Render/RendererTest.php @@ -511,7 +511,7 @@ public function testRenderWithAccessControllerResolved($access) { * @covers ::render * @covers ::doRender */ - public function testRenderAccessCacheablityDependencyInheritance() { + public function testRenderAccessCacheabilityDependencyInheritance() { $build = [ '#access' => AccessResult::allowed()->addCacheContexts(['user']), ];