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

@param string $name    имя файла шаблона
@param string $prefix  опциональный префикс (путь относительно корня шаблонов)

@throws RuntimeException

@return Eresus_Template

@since 3.01
497448
public function getTemplate($name, $prefix = '')
    {
        $path = $this->getFilename($name, $prefix);

        if (!is_file($this->rootDir . '/' . $path))
        {
            throw new RuntimeException('Template not exists: ' . $path);
        }

        $tmpl = new Eresus_Template('templates/' . $path);

        return $tmpl;
    }
259760
protected function findTemplate($name)
    {
        if (!$this->isLoadableTemplate($name)) {
            throw new \Twig_Error_Loader(sprintf('Malformed namespaced template name "%s" (expecting "%stemplate_name").', $name, $this->prefix));
        }

        $templateIdentifier = substr($name, strlen($this->prefix));
        $template = $this->repository->find($templateIdentifier);
        if ($template === null) {
            throw new \Twig_Error_Loader(sprintf('Unable to find template "%s".', $name));
        }
        if (!($template instanceof TemplateInterface)) {
            throw new \Twig_Error_Loader(sprintf('Unexpected template type "%s" found for template "%s".', get_class($template), $name));
        }
        if ($template instanceof TranslatableTemplateInterface) {
            /** @var TranslatableTemplateInterface $template */
            $locale = $this->getCurrentLocale();
            $template->setCurrentLocale($locale);
        }

        return $template;
    }
478486
public function load($name)
    {
        if (!isset($this->templates[$name])) {
            $this->templates[$name] = $this->loadFile($name);
        }

        return $this->templates[$name];
    }
810977
public function & getMethod( $name )
	{
		if( isset( $this->methods[$name] ) )
			return $this->methods[$name];
		throw new RuntimeException( "Method '$name' is unknown" );
	}
833585
public function getPool($name) : CacheItemPoolInterface
    {
        if (!$this->hasPool($name)) {
            throw new RuntimeException(sprintf('Could not find cache pool with name %s.', $name));
        }

        return $this->pools->get($name);
    }
791089
public function getAttribute($name)
    {
        if (mb_strpos($name, '.')) {
            return $this->getAttributeByPath($name);
        }

        if ($this->attribute_map->hasKey($name)) {
            return $this->attribute_map->getItem($name);
        } else {
            throw new RuntimeException('Type has no attribute: ' . $name);
        }
    }
805921
protected function isListKey($name, $prefix = null)
    {
        return $this->prefixKey($this->getIndexKey(), $prefix) === $name;
    }
518179
public function render($name, array $context = [])
    {
        $template = $this->environment->loadTemplate($name);
        return $template->render($context);
    }
1117806
public function enable($name = null)
	{
		// Check if it exists. if not, bail out
		if ( ! $this->field($name))
		{
			throw new \RuntimeException('Field "'.$name.'" does not exist in this Fieldset.');
		}

		if (isset($this->disabled[$name]))
		{
			unset($this->disabled[$name]);
		}

		return $this;
	}
630564
public function getTemplate($name)
    {
        dump($name);
        $templateName = $this->loader->getTemplate($name);
        try {
            $template = $this->environment->loadTemplate($templateName);
        } catch (\Twig_Error_Loader $e) {
            throw $e;
        }

        return $template;
    }
1025983
protected function getTemplate($template, $name)
    {
        // We begin by fetching the master migration stub.
        $stub = $this->file->get(__DIR__.'/templates/migration/migration.txt');

        // Next, set the migration class name
        $stub = str_replace('{{name}}', \Str::studly($name), $stub);

        // Now, we're going to handle the tricky
        // work of creating the Schema
        $upMethod = $this->getUpStub();
        $downMethod = $this->getDownStub();

        // Finally, replace the migration stub with the dynamic up and down methods
        $stub = str_replace('{{up}}', $upMethod, $stub);
        $stub = str_replace('{{down}}', $downMethod, $stub);

        return $stub;
    }
733123
public function getTemplate($name)
    {
        if (!$this->hasTemplate($name)) {
            throw new \RuntimeException("Template with name \"".$name."\" is not exist");
        }

        $filename = $this->templateMap[$name];

        if (!file_exists($filename)) {
            throw new \RuntimeException("Invalid template filename with name \"".$name."\"");
        }

        return $filename;
    }
759184
public function getElement( $name, $prefix = null )
	{
		return $this->hasElement( $name, $prefix )
			? $this->elements[ is_null( $prefix ) ? $name : "$prefix:$name" ]
			: false;
	}
1136675
protected function initializeCache(string $name = 'ttaddress_geocoding'): FrontendInterface
    {
        try {
            $cacheManager = GeneralUtility::makeInstance(CacheManager::class);
            return $cacheManager->getCache($name);
        } catch (\TYPO3\CMS\Core\Cache\Exception\NoSuchCacheException $e) {
            throw new \RuntimeException('Unable to load Cache!', 1548785854);
        }
    }
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]);
    }
1253495
public function getBlendableTemplate($name)
    {
        /** @var \LCI\Blend\Blendable\Template $template */
        $template = new Template($this->modx, $this->blender, $name);
        return $template->setSeedsDir($this->blender->getSeedsDir());
    }
529988
protected function CreateField($name, $prefix = '', $alias = '')
    {
        return new Field($this->connection, $name, $prefix, $alias);
    }