Skip to content
Snippets Groups Projects
Commit 2f5bf09b authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2603786 by joelpittet, Wim Leers, Fabianx: Make...

Issue #2603786 by joelpittet, Wim Leers, Fabianx: Make Renderer(Interface)::renderPlaceholder() public
parent 35ed46b4
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -158,24 +158,9 @@ 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}
*/
protected function renderPlaceholder($placeholder, array $elements) {
public function renderPlaceholder($placeholder, array $elements) {
// Get the render array for the given placeholder
$placeholder_elements = $elements['#attached']['placeholders'][$placeholder];
......@@ -196,7 +181,6 @@ protected function renderPlaceholder($placeholder, array $elements) {
return $elements;
}
/**
* {@inheritdoc}
*/
......@@ -647,6 +631,8 @@ protected function setCurrentRenderContext(RenderContext $context = NULL) {
*
* @returns bool
* Whether placeholders were replaced.
*
* @see \Drupal\Core\Render\Renderer::renderPlaceholder()
*/
protected function replacePlaceholders(array &$elements) {
if (!isset($elements['#attached']['placeholders']) || empty($elements['#attached']['placeholders'])) {
......
......@@ -33,7 +33,7 @@ interface RendererInterface {
* @throws \LogicException
* When called from inside another renderRoot() call.
*
* @see ::render()
* @see \Drupal\Core\Render\RendererInterface::render()
*/
public function renderRoot(&$elements);
......@@ -61,11 +61,29 @@ public function renderRoot(&$elements);
* @return \Drupal\Component\Render\MarkupInterface
* The rendered HTML.
*
* @see ::renderRoot()
* @see ::render()
* @see \Drupal\Core\Render\RendererInterface::renderRoot()
* @see \Drupal\Core\Render\RendererInterface::render()
*/
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 \Drupal\Core\Render\RendererInterface::render()
*/
public function renderPlaceholder($placeholder, array $elements);
/**
* Renders HTML given a structured array tree.
*
......@@ -317,7 +335,7 @@ public function renderPlain(&$elements);
* @see \Drupal\Core\Theme\ThemeManagerInterface::render()
* @see drupal_process_states()
* @see \Drupal\Core\Render\AttachmentsResponseProcessorInterface::processAttachments()
* @see ::renderRoot()
* @see \Drupal\Core\Render\RendererInterface::renderRoot()
*/
public function render(&$elements, $is_root_call = FALSE);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment