summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwebchick2015-04-15 16:56:41 (GMT)
committerwebchick2015-04-15 16:56:41 (GMT)
commite02a165671420f74ab3a004050a6790999930c07 (patch)
treef52b53232f2eb5282684685aa28c29256936e32b
parentbd36946ac3f68b3a917e9555221c32cf49733b38 (diff)
Issue #2471216 by joshi.rohit100, PieterJanPut, Wim Leers: render() should call the renderer service directly
-rw-r--r--core/includes/common.inc10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/includes/common.inc b/core/includes/common.inc
index 5841fc2..d561199 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -1185,9 +1185,9 @@ function drupal_render_children(&$element, $children_keys = NULL) {
/**
* Renders an element.
*
- * This function renders an element using drupal_render(). The top level
- * element is shown with show() before rendering, so it will always be rendered
- * even if hide() had been previously used on it.
+ * This function renders an element. The top level element is shown with show()
+ * before rendering, so it will always be rendered even if hide() had been
+ * previously used on it.
*
* @param $element
* The element to be rendered.
@@ -1195,7 +1195,7 @@ function drupal_render_children(&$element, $children_keys = NULL) {
* @return
* The rendered element.
*
- * @see drupal_render()
+ * @see \Drupal\Core\Render\RendererInterface
* @see show()
* @see hide()
*/
@@ -1209,7 +1209,7 @@ function render(&$element) {
return $element['#markup'];
}
show($element);
- return drupal_render($element);
+ return \Drupal::service('renderer')->render($element);
}
else {
// Safe-guard for inappropriate use of render() on flat variables: return