code: public function selectRenderer(ViewEvent $e)
      {
          if ($this->renderer->canRender($e->getModel()->getTemplate())) {
              return $this->renderer;
          }
          return false;
      }
docs: Determine if the renderer can load the requested template.
  
  @param ViewEvent $e
  @return bool|TwigRenderer