diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php index db4a5d8..fdb9ef7 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php @@ -1591,8 +1591,7 @@ protected function addSelfTokens(&$tokens, $item) { } protected function documentSelfTokens(&$tokens) { } /** - * Call out to the theme() function, which probably just calls render() but - * allows sites to override output fairly easily. + * Pass values to drupal_render() using $this->themeFunctions() as #theme. * * @param \Drupal\views\ResultRow $values * Holds single row of a view's result set. @@ -1601,12 +1600,13 @@ protected function documentSelfTokens(&$tokens) { } * Returns rendered output of the given theme implementation. */ function theme(ResultRow $values) { - return theme($this->themeFunctions(), - array( - 'view' => $this->view, - 'field' => $this, - 'row' => $values - )); + $build = array( + '#theme' => $this->themeFunctions(), + '#view' => $this->view, + '#field' => $this, + '#row' => $values, + ); + return drupal_render($build); } public function themeFunctions() { diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/row/RssFields.php b/core/modules/views/lib/Drupal/views/Plugin/views/row/RssFields.php index 9c3b7ff..00d371d 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/row/RssFields.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/row/RssFields.php @@ -171,13 +171,14 @@ public function render($row) { } } - return theme($this->themeFunctions(), - array( - 'view' => $this->view, - 'options' => $this->options, - 'row' => $item, - 'field_alias' => isset($this->field_alias) ? $this->field_alias : '', - )); + $build = array( + '#theme' => $this->themeFunctions(), + '#view' => $this->view, + '#options' => $this->options, + '#row' => $item, + '#field_alias' => isset($this->field_alias) ? $this->field_alias : '', + ); + return drupal_render($build); } /** diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/style/Rss.php b/core/modules/views/lib/Drupal/views/Plugin/views/style/Rss.php index adb23b2..0a6f8cb 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/style/Rss.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/style/Rss.php @@ -134,14 +134,14 @@ public function render() { $rows .= $this->view->rowPlugin->render($row); } - $output = theme($this->themeFunctions(), - array( - 'view' => $this->view, - 'options' => $this->options, - 'rows' => $rows - )); + $build = array( + '#theme' => $this->themeFunctions(), + '#view' => $this->view, + '#options' => $this->options, + '#rows' => $rows, + ); unset($this->view->row_index); - return $output; + return drupal_render($build); } }