summaryrefslogtreecommitdiffstats
path: root/core/lib/Drupal/Core/Render
diff options
context:
space:
mode:
authorNathaniel Catchpole2017-05-02 09:37:54 (GMT)
committerNathaniel Catchpole2017-05-02 09:37:54 (GMT)
commit494271d030fa8d3a0bd0c68facc605bf1e354d31 (patch)
tree0a1b97ca900a9c8ab944857321391825d807f08e /core/lib/Drupal/Core/Render
parent4d80891f80409361c9b06fce5fbf98a8f2710b38 (diff)
Issue #2712647 by slasher13, klausi, catch, jibran, Manuel Garcia, alexpott, mpdonadio, naveenvalecha, neclimdul, timmillwood, webflo, dawehner, Wim Leers, pounard: Update Symfony components to ~3.2
Diffstat (limited to 'core/lib/Drupal/Core/Render')
-rw-r--r--core/lib/Drupal/Core/Render/PlaceholderingRenderCache.php4
-rw-r--r--core/lib/Drupal/Core/Render/RenderCache.php8
-rw-r--r--core/lib/Drupal/Core/Render/Renderer.php4
3 files changed, 8 insertions, 8 deletions
diff --git a/core/lib/Drupal/Core/Render/PlaceholderingRenderCache.php b/core/lib/Drupal/Core/Render/PlaceholderingRenderCache.php
index 4256283..0422ecf 100644
--- a/core/lib/Drupal/Core/Render/PlaceholderingRenderCache.php
+++ b/core/lib/Drupal/Core/Render/PlaceholderingRenderCache.php
@@ -93,7 +93,7 @@ class PlaceholderingRenderCache extends RenderCache {
*/
public function get(array $elements) {
// @todo remove this check when https://www.drupal.org/node/2367555 lands.
- if (!$this->requestStack->getCurrentRequest()->isMethodSafe()) {
+ if (!$this->requestStack->getCurrentRequest()->isMethodCacheable()) {
return FALSE;
}
@@ -127,7 +127,7 @@ class PlaceholderingRenderCache extends RenderCache {
$result = parent::set($elements, $pre_bubbling_elements);
// @todo remove this check when https://www.drupal.org/node/2367555 lands.
- if (!$this->requestStack->getCurrentRequest()->isMethodSafe()) {
+ if (!$this->requestStack->getCurrentRequest()->isMethodCacheable()) {
return FALSE;
}
diff --git a/core/lib/Drupal/Core/Render/RenderCache.php b/core/lib/Drupal/Core/Render/RenderCache.php
index 12d52e9..9ac3381 100644
--- a/core/lib/Drupal/Core/Render/RenderCache.php
+++ b/core/lib/Drupal/Core/Render/RenderCache.php
@@ -61,9 +61,9 @@ class RenderCache implements RenderCacheInterface {
public function get(array $elements) {
// Form submissions rely on the form being built during the POST request,
// and render caching of forms prevents this from happening.
- // @todo remove the isMethodSafe() check when
+ // @todo remove the isMethodCacheable() check when
// https://www.drupal.org/node/2367555 lands.
- if (!$this->requestStack->getCurrentRequest()->isMethodSafe() || !$cid = $this->createCacheID($elements)) {
+ if (!$this->requestStack->getCurrentRequest()->isMethodCacheable() || !$cid = $this->createCacheID($elements)) {
return FALSE;
}
$bin = isset($elements['#cache']['bin']) ? $elements['#cache']['bin'] : 'render';
@@ -88,9 +88,9 @@ class RenderCache implements RenderCacheInterface {
public function set(array &$elements, array $pre_bubbling_elements) {
// Form submissions rely on the form being built during the POST request,
// and render caching of forms prevents this from happening.
- // @todo remove the isMethodSafe() check when
+ // @todo remove the isMethodCacheable() check when
// https://www.drupal.org/node/2367555 lands.
- if (!$this->requestStack->getCurrentRequest()->isMethodSafe() || !$cid = $this->createCacheID($elements)) {
+ if (!$this->requestStack->getCurrentRequest()->isMethodCacheable() || !$cid = $this->createCacheID($elements)) {
return FALSE;
}
diff --git a/core/lib/Drupal/Core/Render/Renderer.php b/core/lib/Drupal/Core/Render/Renderer.php
index 257349f..287ffbb 100644
--- a/core/lib/Drupal/Core/Render/Renderer.php
+++ b/core/lib/Drupal/Core/Render/Renderer.php
@@ -338,9 +338,9 @@ class Renderer implements RendererInterface {
// If instructed to create a placeholder, and a #lazy_builder callback is
// present (without such a callback, it would be impossible to replace the
// placeholder), replace the current element with a placeholder.
- // @todo remove the isMethodSafe() check when
+ // @todo remove the isMethodCacheable() check when
// https://www.drupal.org/node/2367555 lands.
- if (isset($elements['#create_placeholder']) && $elements['#create_placeholder'] === TRUE && $this->requestStack->getCurrentRequest()->isMethodSafe()) {
+ if (isset($elements['#create_placeholder']) && $elements['#create_placeholder'] === TRUE && $this->requestStack->getCurrentRequest()->isMethodCacheable()) {
if (!isset($elements['#lazy_builder'])) {
throw new \LogicException('When #create_placeholder is set, a #lazy_builder callback must be present as well.');
}