class TestPlaceholderingRenderCache

Same name in other branches
  1. 10 core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php \Drupal\Tests\Core\Render\TestPlaceholderingRenderCache

Hierarchy

Expanded class hierarchy of TestPlaceholderingRenderCache

File

core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php, line 1206

Namespace

Drupal\Tests\Core\Render
View source
class TestPlaceholderingRenderCache extends PlaceholderingRenderCache {
    
    /**
     * The placeholder elements created during rendering.
     */
    public array $placeholderElements = [];
    protected function createPlaceholderAndRemember(array $rendered_elements, array $pre_bubbling_elements) {
        $placeholder_element = parent::createPlaceholderAndRemember($rendered_elements, $pre_bubbling_elements);
        $this->placeholderElements[] = $placeholder_element;
        return $placeholder_element;
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
PlaceholderingRenderCache::$placeholderResultsCache protected property Stores rendered results for automatically placeholdered elements.
PlaceholderingRenderCache::get public function Gets the cached, pre-rendered element of a renderable element from cache. Overrides RenderCache::get
PlaceholderingRenderCache::getFromPlaceholderResultsCache protected function Retrieves an auto-placeholdered renderable array from the static cache.
PlaceholderingRenderCache::set public function Caches the rendered output of a renderable array. Overrides RenderCache::set
PlaceholderingRenderCache::__construct public function Constructs a new PlaceholderingRenderCache object. Overrides RenderCache::__construct
RenderCache::getCacheableRenderArray public function Gets a cacheable render array for a render array and its rendered output. Overrides RenderCacheInterface::getCacheableRenderArray
RenderCache::isElementCacheable protected function Checks whether a renderable array can be cached.
TestPlaceholderingRenderCache::$placeholderElements public property The placeholder elements created during rendering.
TestPlaceholderingRenderCache::createPlaceholderAndRemember protected function Create a placeholder for a renderable array and remember in a static cache. Overrides PlaceholderingRenderCache::createPlaceholderAndRemember

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.