You are here

protected function RendererTrait::renderer in Markdown 8.2

Retrieves the Renderer service.

Return value

\Drupal\Core\Render\RendererInterface The Renderer service.

File

src/Traits/RendererTrait.php, line 25

Class

RendererTrait
Trait for utilizing the Renderer service.

Namespace

Drupal\markdown\Traits

Code

protected function renderer() {
  if (!static::$renderer) {
    static::$renderer = \Drupal::service('renderer');
  }
  return static::$renderer;
}