interface PlaceholderStrategyInterface

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Render/Placeholder/PlaceholderStrategyInterface.php \Drupal\Core\Render\Placeholder\PlaceholderStrategyInterface
  2. 8.9.x core/lib/Drupal/Core/Render/Placeholder/PlaceholderStrategyInterface.php \Drupal\Core\Render\Placeholder\PlaceholderStrategyInterface
  3. 10 core/lib/Drupal/Core/Render/Placeholder/PlaceholderStrategyInterface.php \Drupal\Core\Render\Placeholder\PlaceholderStrategyInterface

Provides an interface for defining a placeholder strategy service.

Hierarchy

Expanded class hierarchy of PlaceholderStrategyInterface

All classes that implement PlaceholderStrategyInterface

2 files declare their use of PlaceholderStrategyInterface
BigPipeStrategy.php in core/modules/big_pipe/src/Render/Placeholder/BigPipeStrategy.php
HtmlResponsePlaceholderStrategySubscriber.php in core/lib/Drupal/Core/EventSubscriber/HtmlResponsePlaceholderStrategySubscriber.php

File

core/lib/Drupal/Core/Render/Placeholder/PlaceholderStrategyInterface.php, line 8

Namespace

Drupal\Core\Render\Placeholder
View source
interface PlaceholderStrategyInterface {
    
    /**
     * Processes placeholders to render them with different strategies.
     *
     * @param array $placeholders
     *   The placeholders to process, with the keys being the markup for the
     *   placeholders and the values the corresponding render array describing the
     *   data to be rendered.
     *
     * @return array
     *   The resulting placeholders, with a subset of the keys of $placeholders
     *   (and those being the markup for the placeholders) but with the
     *   corresponding render array being potentially modified to render e.g. an
     *   ESI or BigPipe placeholder.
     */
    public function processPlaceholders(array $placeholders);

}

Members

Title Sort descending Modifiers Object type Summary Overrides
PlaceholderStrategyInterface::processPlaceholders public function Processes placeholders to render them with different strategies. 3

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