locate() публичный Метод

Search for the template in every specified bundle
public locate ( string $templatePath ) : string
$templatePath string The template to find.
Результат string The full template name.
Пример #1
0
 /**
  * Return the template for rendering a status code
  *
  * @param Request $request
  * @param string  $format
  * @param integer $code          Status code to locate a template
  * @param bool    $showException
  *
  * @return TemplateReferenceInterface
  */
 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);
 }