protected function findTemplate(Request $request, $format, $code, $showException) { if (!$this->supports($request)) { return parent::findTemplate($request, $format, $code, $showException); } return $this->templateLocator->locate(isset($this->templateByCode[$code]) ? $this->templateByCode[$code] : $this->defaultTemplate); }