You are here

public static function RenderCache::isRecursive in Render cache 7.2

Returns if we are within a recursive rendering context.

This is useful to determine if its safe to output a placeholder, so that #post_render_cache will work.

Return value

bool TRUE if we are within a recursive context, FALSE otherwise.

2 calls to RenderCache::isRecursive()
RenderCacheTest::testRenderCache in lib/Drupal/render_cache/Tests/RenderCacheTest.php
The basic functionality of the RenderCache class.
render_cache_comment_node_view in modules/utility/render_cache_comment/render_cache_comment.module
Implements hook_node_view()

File

lib/RenderCache.php, line 158
Contains RenderCache

Class

RenderCache
Static Service Container wrapper wrapping Drupal class.

Code

public static function isRecursive() {
  return static::$renderStack
    ->isRecursive();
}