Get the custom VCL template, if it exists
Returns 'null' if the file doesn't exist

@return string
507557
protected function _getCustomTemplateFilename() {
        $filePath = $this->_formatTemplate(
            Mage::getStoreConfig('turpentine_varnish/servers/custom_vcl_template'),
            array('root_dir' => Mage::getBaseDir())
        );
        if (is_file($filePath)) { return $filePath; } else { return null; }
    }
1073922
public function getPreview(): ?string
    {
        $array = glob($this->getPath() . '/assets/images/preview.{jpg,jpeg,png,gif}', GLOB_BRACE);
        if (isset($array[0])) {
            return sprintf('/themes/%s/images/%s', $this->shortName, (new SplFileInfo($array[0]))->getBasename());
        }

        return null;
    }
328591
public function template($var = null)
    {
        if ($var !== null) {
            $this->template = $var;
        }
        if (empty($this->template)) {
            $this->template = ($this->modular() ? 'modular/' : '') . str_replace($this->extension(), '', $this->name());
        }

        return $this->template;
    }
1173306
function &get_template_vars($name=null)
	{
		if(!isset($name)) {
			return $this->_tpl_vars;
		} elseif(isset($this->_tpl_vars[$name])) {
			return $this->_tpl_vars[$name];
		} else {
			// var non-existant, return valid reference
			$_tmp = null;
			return $_tmp;
		}
	}
192913
public function getHtml(): string
  {
    $this->prepareOverviewTable();

    if (!empty($this->templateData))
    {
      $this->setAttrData('slat-name', $this->submitName);

      // If required add template row to this louver control. This row will be used by JS for adding dynamically
      // additional rows to the louver control.
      $this->templateData[$this->templateKey] = 0;
      $row                                    = $this->rowFactory->createRow($this, $this->templateData);
      $row->addClass('slat_template');
      $row->setAttrStyle('visibility: collapse');
      $row->prepare($this->submitName);
    }

    $ret = $this->prefix;

    $ret .= Html::generateTag('table', $this->attributes);

    // Generate HTML code for the column classes.
    $ret .= '<colgroup>';
    $ret .= $this->rowFactory->getHtmlColumnGroup();
    $ret .= '</colgroup>';

    $ret .= Html::generateTag('thead', ['class' => OverviewTable::$class]);
    $ret .= $this->getHtmlHeader();
    $ret .= '</thead>';

    if ($this->footerControl)
    {
      $ret .= Html::generateTag('tfoot', ['class' => OverviewTable::$class]);
      $ret .= '<tr>';
      $ret .= Html::generateTag('td', ['colspan' => $this->rowFactory->getNumberOfColumns()]);
      $ret .= $this->footerControl->getHtml();
      $ret .= '</td>';
      $ret .= '<td class="error"></td>';
      $ret .= '</tr>';
      $ret .= '</tfoot>';
    }

    $ret .= Html::generateTag('tbody', ['class' => OverviewTable::$class]);
    $ret .= $this->getHtmlBody();
    $ret .= '</tbody>';

    $ret .= '</table>';

    $ret .= $this->postfix;

    $this->rowFactory->generateResponsiveCss($this->getAttribute('id'));

    return $ret;
  }
990848
public function getFileLinkTemplate()
    {
        return sprintf(
            'http://%s/%s/blob/%s/{FILE}#L{LINE}',
            $this->getProject()->getAccessInformation("domain"),
            $this->getProject()->getReference(),
            $this->getCommitId()
        );
    }
59989
public function getTemplatePath()
    {
        // get template filename
        $useRepositoryLayer = config('generator.use_repository_layer', true);
        $useServiceLayer = config('generator.use_service_layer', true);
        if ($useServiceLayer && $useRepositoryLayer) {
            $templateFilename = 'Controller_Service';
        } elseif ($useRepositoryLayer) {
            $templateFilename = 'Controller_Repository';
        } else {
            $templateFilename = 'Controller';
        }
        return 'scaffold/'.$templateFilename;
    }
297350
private function _get_template( $fallback = '' ) {
		$templates = $this->_templates();

		foreach ( $templates as $template ) {
			if ( file_exists( $template ) ) {
				return $template;
			}
		}

		return $fallback;
	}
789844
protected function _template() {
		$file = Libraries::locate('command.create.template', $this->template, [
			'filter' => false, 'type' => 'file', 'suffix' => '.txt.php'
		]);
		if (!$file || is_array($file)) {
			return false;
		}
		return file_get_contents($file);
	}
722243
private function getTemplate()
    {
        $template = config('laranotify.template');
        if ($template == '' && $this->template == '') {
            return $this->defaultTemplate();
        }

        if ($this->template != '') {
            return ($this->template);
        }

        return view($template);
    }
875100
private function loadTemplate()
    {
        return [
            0 => $this->template[0] != '' ? file_get_contents($this->template[0]) : '',
            1 => $this->template[1] != '' ? file_get_contents($this->template[1]) : '',
            2 => $this->template[2] != '' ? file_get_contents($this->template[2]) : '',
        ];
    }
74770
public function getTemplate()
    {
        if($this->template != ''){
            return $this->template;
        }

        if(($defaultTemplate = $this->container->getConfigInstance()->getDefaultTemplateName()) == null){
            return '';
        }

        return $defaultTemplate;
    }
820212
private function getViewsToTreat()
    {
        $templateRepo = $this->entityManager->getRepository('VictoireTemplateBundle:Template');
        $rootTemplates = $templateRepo->getInstance()
            ->where('template.template IS NULL')
            ->getQuery()
            ->getResult();
        $templates = [];
        $recursiveGetTemplates = function ($template) use (&$recursiveGetTemplates, &$templates) {
            array_push($templates, $template);
            foreach ($template->getInheritors() as $_template) {
                if ($_template instanceof Template) {
                    $recursiveGetTemplates($_template);
                }
            }
        };

        foreach ($rootTemplates as $rootTemplate) {
            $recursiveGetTemplates($rootTemplate);
        }

        $pageRepo = $this->entityManager->getRepository('VictoirePageBundle:BasePage');
        $pages = $pageRepo->findAll();
        $errorRepo = $this->entityManager->getRepository('VictoireTwigBundle:ErrorPage');
        $errorPages = $errorRepo->findAll();

        return array_merge($templates, array_merge($pages, $errorPages));
    }
939033
public function getToolbarTemplate()
    {
        if (null === $this->templateToolbar) {
            $this->templateToolbar = $this->getTemplatePathDefault('toolbar');
        }

        return $this->templateToolbar;
    }
681617
public function GetTemplateFiles()
	{
		$files = array();
		
		list($nothing,$data) = explode("[files]", $this->GetConfigFileContents(),2);
		
		if ($data)
		{
			$lines = explode("\n",$data);
			
			foreach ($lines as $line)
			{
				if ($line) $files[] = new TemplateFile($line);
			}
		}
		
		return $files;
	}
980295
public function compile()
    {
        $templateFilePrefix = $this->hasLocalizedVersion() ?
            $this->generateLocalizedViewPath() :
            $this->generateDefaultViewPath();

        $content = self::parseFile(
            $templateFilePrefix . $this->getConfig('file_extention'),
            $this->contextualVariables,
            (bool)$this->getConfig('allow_debug')
        );

        if (is_null($this->getConfig("layout"))) {
            return $content;
        }

        $layout = self::parseFile(
            $this->generateDefaultLayoutPath() . $this->getConfig('file_extention'),
            $this->contextualVariables,
            (bool)$this->getConfig('allow_debug')
        );

        return str_replace(self::TPL_YIELD, $content, $layout);
    }
431524
public function template($tpl)
    {
        $extlen = strlen($this->tplext);
        if (substr($tpl, -$extlen) !== $this->tplext) {
            $tpl .= $this->tplext;
        }
        return $this->getTplPath() . DIRECTORY_SEPARATOR . $tpl;
    }