core/lib/Drupal/Core/Render/Renderer.php | 20 +++----------------- core/lib/Drupal/Core/Render/RendererInterface.php | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/core/lib/Drupal/Core/Render/Renderer.php b/core/lib/Drupal/Core/Render/Renderer.php index bae1715..c1cbc0a 100644 --- a/core/lib/Drupal/Core/Render/Renderer.php +++ b/core/lib/Drupal/Core/Render/Renderer.php @@ -158,22 +158,7 @@ public function renderPlain(&$elements) { } /** - * Renders final HTML for a placeholder. - * - * Renders the placeholder in isolation. - * - * @param string $placeholder - * An attached placeholder to render. (This must be a key of one of the - * values of $elements['#attached']['placeholders'].) - * @param array $elements - * The structured array describing the data to be rendered. - * - * @return array - * The updated $elements. - * - * @see ::replacePlaceholders() - * - * @todo Make public as part of https://www.drupal.org/node/2469431 + * {@inheritdoc} */ public function renderPlaceholder($placeholder, array $elements) { // Get the render array for the given placeholder @@ -196,7 +181,6 @@ public function renderPlaceholder($placeholder, array $elements) { return $elements; } - /** * {@inheritdoc} */ @@ -648,6 +632,8 @@ protected function setCurrentRenderContext(RenderContext $context = NULL) { * * @returns bool * Whether placeholders were replaced. + * + * @see ::renderPlaceholder() */ protected function replacePlaceholders(array &$elements) { if (!isset($elements['#attached']['placeholders']) || empty($elements['#attached']['placeholders'])) { diff --git a/core/lib/Drupal/Core/Render/RendererInterface.php b/core/lib/Drupal/Core/Render/RendererInterface.php index ff04d86..ccbe2d5 100644 --- a/core/lib/Drupal/Core/Render/RendererInterface.php +++ b/core/lib/Drupal/Core/Render/RendererInterface.php @@ -67,6 +67,24 @@ public function renderRoot(&$elements); public function renderPlain(&$elements); /** + * Renders final HTML for a placeholder. + * + * Renders the placeholder in isolation. + * + * @param string $placeholder + * An attached placeholder to render. (This must be a key of one of the + * values of $elements['#attached']['placeholders'].) + * @param array $elements + * The structured array describing the data to be rendered. + * + * @return array + * The updated $elements. + * + * @see ::render() + */ + public function renderPlaceholder($placeholder, array $elements); + + /** * Renders HTML given a structured array tree. * * Renderable arrays have two kinds of key/value pairs: properties and