Gets the template object

@return  KTemplateInterface	The template object
971868
public function getTemplate()
    {
        if(!$this->__template instanceof KTemplateInterface)
        {
            if(empty($this->__template) || (is_string($this->__template) && strpos($this->__template, '.') === false) )
            {
                $identifier         = $this->getIdentifier()->toArray();
                $identifier['path'] = array('template');
                $identifier['name'] = $this->__template;
            }
            else $identifier = $this->getIdentifier($this->__template);

            $this->__template = $this->getObject($identifier);
        }

        return $this->__template;
    }
1167781
public function templater()
    {
        if ($this->_templater === null) {
            $class = $this->getConfig('templateClass') ?: 'Cake\View\StringTemplate';
            $this->_templater = new $class();

            $templates = $this->getConfig('templates');
            if ($templates) {
                if (is_string($templates)) {
                    $this->_templater->add($this->_defaultConfig['templates']);
                    $this->_templater->load($templates);
                } else {
                    $this->_templater->add($templates);
                }
            }
        }

        return $this->_templater;
    }
520527
public function getTemplate(Kwf_Component_Data $component, $type)
    {
        if ($type == 'Master') {
            if (Kwc_Abstract::hasSetting($component->componentClass, 'masterTemplate')) {
                return Kwc_Abstract::getSetting($component->componentClass, 'masterTemplate');
            }
        }
        $template = Kwc_Abstract::getTemplateFile($component->componentClass, $type);
        if (!$template) throw new Kwf_Exception("No $type-Template found for '{$component->componentClass}'");
        return $template;
    }
1007221
protected function getTemplate($templateName)
    {
        $template = new Template($this->userTemplatePath . '/' . $templateName);
        $template->setVars($this->dataCollection->toArray());

        return $template;
    }
182063
public function getTemplates()
    {
        $templates_array = [];

        $templates_trait = new \ReflectionClass('App\GeoTemplates');
        $templates = $templates_trait->getMethods();

        if (! count($templates)) {
            abort('403', 'No templates have been found.');
        }

        return $templates;
    }
389106
public function templateFactory()
    {
        if (!isset($this->templateFactory)) {
            throw new RuntimeException(sprintf(
                'Template Factory is not defined for [%s]',
                get_class($this)
            ));
        }

        return $this->templateFactory;
    }
566302
protected function getTemplateManager()
    {
        if (null === $this->templateManager) {
            $this->templateManager = new TemplateManager($this->profiler, $this->twig, $this->templates);
        }

        return $this->templateManager;
    }
319539
public function fetchEmailTemplate()
    {
        if (null !== $this->owner) {
            $this->_template = $this->_repository->getByKeyWithTranslation(
                $this->generateKey(),
                $this->owner->{$this->_languageAttribute}
            );
        } else {
            $this->_template = $this->_repository->create();
        }
    }
1187040
protected function getTemplate()
    {
        $filter_tpl = $this->config->getTemplate();
        $grid_tpl = $this->grid->getConfig()->getTemplate();
        return str_replace('*.', "$grid_tpl.filters.", $filter_tpl);
    }
521257
public function getTemplateAccessors() {
		if($this->templateAccessors) return $this->templateAccessors;

		$vars = parent::getTemplateAccessors();

		return $this->templateAccessors = array_merge($vars, array (
			'To',
			'Cc',
			'Bcc',
			'From',
			'Subject',
			'Body',
			'BaseURL',
			'IsEmail'
		));
	}
532183
public function _getTemplateId()
    {
        return isset($this->templateId) ? $this->templateId : $this->templateId =
            $this->smarty->_getTemplateId($this->template_resource, $this->cache_id, $this->compile_id);
    }
1063173
public function getRenderTemplates()
    {
        $ClassName = $this->ClassName;

        if (is_object($ClassName)) $ClassName = get_class($ClassName);

        if (!is_subclass_of($ClassName, DataObject::class)) {
            throw new InvalidArgumentException($ClassName . ' is not a subclass of DataObject');
        }

        $templates = [
            'type' => 'Includes'
        ];
        while ($next = get_parent_class($ClassName)) {
            $baseClassName = $this->baseClassName($ClassName);
            if ($this->style) {
                $templates[] = $baseClassName . '_' . $this->style;
            }
            $templates[] = $baseClassName;
            if ($next == DataObject::class) {
                return $templates;
            }
            $ClassName = $next;
        }
    }
375591
public static function getTemplateFolder()
  {
    $folder = self::path() . self::$templateFolder;
    return rtrim(realpath($folder), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
  }
1019512
public function getTemplate($key)
    {
        if (isset($this->templates[$key])) {
            return $this->templates[$key];
        }
        return null;
    }
1341914
public function getTemplatesToGenerate()
    {
        return parent::getTemplatesToGenerate() + array(
            'EditBuilderTemplate'.self::TWIG_EXTENSION
                => 'Resources/views/'.$this->getBaseGeneratorName().'New/index.html.twig',
            'Edit/FormBuilderTemplate'.self::TWIG_EXTENSION
                => 'Resources/views/'.$this->getBaseGeneratorName().'New/form.html.twig',
        );
    }
728461
public function getFormTemplate()
    {
        if (null === $this->formTemplate) {
            $template = rtrim($this->getTemplatePrefix(), '/') . '/' . $this->getFormSuffix();
            $this->setFormTemplate($template);
        }

        return $this->formTemplate;
    }
811277
final private function getTemplate() {
		
		if (!$this->template or !$this->template->areKeysPopulated()) {
			$this->template = Template::getDefault();
		}
		
		// if this is derived template, load derived.php file
		if ($this->template->derived) {
			$derivedFile = $this->template->getBaseFolder() . '/'  . strtolower($this->template->name) . '/derived.php';
			if (file_exists($derivedFile)) require $derivedFile;
		}
		
		return $this->template;

	}