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 Overrides RenderCache::get
PlaceholderingRenderCache::getFromPlaceholderResultsCache protected function Retrieves an auto-placeholdered renderable array from the static cache.
PlaceholderingRenderCache::set public function Overrides RenderCache::set
PlaceholderingRenderCache::__construct public function Constructs a new PlaceholderingRenderCache object. Overrides RenderCache::__construct
RenderCache::getCacheableRenderArray public function 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 Overrides PlaceholderingRenderCache::createPlaceholderAndRemember

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