src/Core/Render/RendererTrait.php
public function getrenderer() {
    if (empty($this->renderer)) {
      $this->renderer = \Drupal::service('renderer');
    }
    return $this->renderer;
  }
public function getrenderer() {
    if (empty($this->renderer)) {
      $this->renderer = \Drupal::service('renderer');
    }
    return $this->renderer;
  }
public function getrenderer ( ) { if ( empty ( $ this -> renderer ) ) { $ this -> renderer = \ Drupal :: service ( 'renderer' ) ; } return $ this -> renderer ; }
Gets the renderer.

@return \Drupal\Core\Render\RendererInterface
The renderer.
Gets the renderer .