Возвращает шаблон

@param string $name

@return Eresus_Template
339029
public function getTemplate($name)
    {
        $filename = $this->getResource($name);
        $template = new Eresus_Template($filename);
        return $template;
    }
1309719
public function getSource($name) {
        $path = $this->findTemplate($name);
        if(!$path){
            \Debug::stop($name,'Шаблон "'.$name.'" не найден');
        }
        return file_get_contents($path);
    }
478486
public function load($name)
    {
        if (!isset($this->templates[$name])) {
            $this->templates[$name] = $this->loadFile($name);
        }

        return $this->templates[$name];
    }
1127161
public function getTemplate($name)
    {
        if (!isset($this->templates[$name])) {
            throw new MissingTemplateException(sprintf('Unable to get template for "%s", there is no such template configured.', $name));
        }

        $template = (string) $this->templates[$name];
        if ('' === $template) {
            throw new MissingTemplateException(sprintf('Unable to get template for "%s", it seems the template value is empty. Make sure you enabled the proper section and configured a proper value.', $name));
        }

        return $template;
    }
479222
public function render()
    {
        $tmpl = new Eresus_Template($this->getTemplate());

        $data = array('pagination' => $this);

        return $tmpl->compile($data);
    }
888970
public function create($name)
	{
		$model = Bauhaus::getInstance($name)->buildForm();

		return View::make($model->getView('create'))
			->with('name',  $name)
			->with('model', $model);
	}
525704
public static function template($name)
    {
        $template = null;

        //
        // It's a template name or template contents?
        //
        if (preg_match('/^[A-Za-z0-9_\.\-\/]+\.html$/', $name)) {
            // It's a template name!
            $template = static::get(self::TYPE_TEMPLATE, $name);

            if (!$template) {
                $fallback_template_path = shared_storage_dir() . '/default/templates/' . $name;
                // try to retrieve local fallback template
                if (!file_exists($fallback_template_path)) {
                    throw new Exceptions\MethodFailureException("Template not found: '{$name}'. Please run `hook generate:template {$name}` to generate one.");
                }

                // use local template if can't find
                $template = new static(array(
                    'type' => self::TYPE_TEMPLATE,
                    'code' => file_get_contents($fallback_template_path),
                    'name' => $name
                ));
            }
        }

        if (!$template) {
            $template = new static(array(
                'type' => self::TYPE_TEMPLATE,
                'code' => $name,
                'name' => 'inline-template.html'
            ));
        }

        return $template;
    }
1156422
public static function getByName(string $name): QuoteTemplateCollection
    {
        $invoiceTemplates = QuoteTemplate::get()->where("name", $name);

        return new QuoteTemplateCollection($invoiceTemplates->elements());
    }
1162241
public   function getTemplate($name)
    {
          foreach($this->templates as $handler){
              
             if(is_string($handler)){
                 $template = $handler($name);
             }                             
             
              
              if(strlen($template) >0){
                  return $template;
              }
          }
    }
1305508
public function hasHeader($name)
    {
        $name = strtolower($name);
        if (!$this->request) {
            return $this->getRequest()->hasHeader($name);
        }
        return parent::hasHeader($name);
    }
371868
public function createBatchActionForm($name)
    {
        /** @var AbstractAdmin $admin */
        $admin = $this->getAdmin();

        $container = $admin->getContainer();

        return $container->get('form.factory')->createNamedBuilder($name, 'form', [], [
            'label_format' => 'form.label_%name%',
            'translation_domain' => $admin->getTranslationDomain(),
        ]);
    }
470751
protected function findTemplate($name)
    {
        try {
            return parent::findTemplate($name);
        } catch (\Twig_Error_Loader $e) {
            $namespace = self::MAIN_NAMESPACE;

            if (is_readable($name)) {
                return $name;
            }

            throw new \Twig_Error_Loader(sprintf(
                'Unable to find template "%s" (looked into: %s).',
                $name,
                implode(', ', $this->paths[$namespace])
            ));
        }
    }
1099631
public function client($filename)
    {
        $path = $this->clientPath($filename, false);
        return Eresus_Template::loadFromFile($path);
    }
911906
public function getCache($name)
    {
        if (isset($this->_caches[$name])) {
            return $this->_caches[$name];
        }
        if (isset($this->_optionTemplates[$name])) {
            if ($name == self::PAGECACHE
                && (!isset($this->_optionTemplates[$name]['backend']['options']['tag_cache'])
                || !$this->_optionTemplates[$name]['backend']['options']['tag_cache'] instanceof Zend_Cache_Core)
            ) {
                $this->_optionTemplates[$name]['backend']['options']['tag_cache']
                    = $this->getCache(self::PAGETAGCACHE);
            }

            $this->_caches[$name] = Zend_Cache::factory(
                $this->_optionTemplates[$name]['frontend']['name'],
                $this->_optionTemplates[$name]['backend']['name'],
                isset($this->_optionTemplates[$name]['frontend']['options']) ? $this->_optionTemplates[$name]['frontend']['options'] : array(),
                isset($this->_optionTemplates[$name]['backend']['options']) ? $this->_optionTemplates[$name]['backend']['options'] : array(),
                isset($this->_optionTemplates[$name]['frontend']['customFrontendNaming']) ? $this->_optionTemplates[$name]['frontend']['customFrontendNaming'] : false,
                isset($this->_optionTemplates[$name]['backend']['customBackendNaming']) ? $this->_optionTemplates[$name]['backend']['customBackendNaming'] : false,
                isset($this->_optionTemplates[$name]['frontendBackendAutoload']) ? $this->_optionTemplates[$name]['frontendBackendAutoload'] : false
            );

            return $this->_caches[$name];
        }
    }
1333489
protected function getTemplate($template, $name)
    {
        $this->template = $this->file->get($template);

        if ($this->needsScaffolding($template))
        {
            return $this->getScaffoldedTemplate($name);
        }

        // Otherwise, just set the file
        // contents to the file name
        return $name . PHP_EOL;
    }
531553
public function getDefaultTemplate($name)
    {
        $templatesNamespace = (string) $this->metadata->getTemplatesNamespace();

        if (false !== strpos($templatesNamespace, ':')) {
            return sprintf('%s:%s.%s', $templatesNamespace ?: ':', $name, 'twig');
        }

        return sprintf('%s/%s.%s', $templatesNamespace, $name, 'twig');
    }
999585
public function loadTemplate($name)
    {
        $template = new Template();
        $template->app = $this;

        if (in_array($name[0], ['.', '/', '\\']) || strpos($name, ':\\') !== false) {
            return $template->load($name);
        } else {
            $dir = is_array($this->template_dir) ? $this->template_dir : [$this->template_dir];
            foreach ($dir as $td) {
                if ($t = $template->tryLoad($td.'/'.$name)) {
                    return $t;
                }
            }
        }

        throw new Exception(['Can not find template file', 'name'=>$name, 'template_dir'=>$this->template_dir]);
    }