function FieldPluginBase::getRenderer

Same name in other branches
  1. 9 core/modules/views/src/Plugin/views/field/FieldPluginBase.php \Drupal\views\Plugin\views\field\FieldPluginBase::getRenderer()
  2. 10 core/modules/views/src/Plugin/views/field/FieldPluginBase.php \Drupal\views\Plugin\views\field\FieldPluginBase::getRenderer()
  3. 11.x core/modules/views/src/Plugin/views/field/FieldPluginBase.php \Drupal\views\Plugin\views\field\FieldPluginBase::getRenderer()

Returns the render API renderer.

Return value

\Drupal\Core\Render\RendererInterface

Overrides PluginBase::getRenderer

1 call to FieldPluginBase::getRenderer()
FieldPluginBase::theme in core/modules/views/src/Plugin/views/field/FieldPluginBase.php
Passes values to drupal_render() using $this->themeFunctions() as #theme.

File

core/modules/views/src/Plugin/views/field/FieldPluginBase.php, line 1849

Class

FieldPluginBase
Base class for views fields.

Namespace

Drupal\views\Plugin\views\field

Code

protected function getRenderer() {
    if (!isset($this->renderer)) {
        $this->renderer = \Drupal::service('renderer');
    }
    return $this->renderer;
}

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