Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. PluginBase.php

function PluginBase::getRenderer

Returns the render API renderer.

Return value

\Drupal\Core\Render\RendererInterface

1 call to PluginBase::getRenderer()
StylePluginBase::renderFields in core/modules/views/src/Plugin/views/style/StylePluginBase.php
Renders all of the fields for a given style and store them on the object.
1 method overrides PluginBase::getRenderer()
FieldPluginBase::getRenderer in core/modules/views/src/Plugin/views/field/FieldPluginBase.php
Returns the render API renderer.

File

core/modules/views/src/Plugin/views/PluginBase.php, line 662

Class

PluginBase
Base class for any views plugin types.

Namespace

Drupal\views\Plugin\views

Code

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

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal