CampHTMLDocument::templateExists PHP Method

templateExists() private method

Test if template exists
private templateExists ( string $template, Smarty $smarty ) : boolean
$template string
$smarty Smarty
return boolean
    private function templateExists($template, $smarty)
    {
        foreach ($smarty->template_dir as $dir) {
            $filePath = "{$dir}/" . ltrim($template, '/');
            if (file_exists($filePath)) {
                return true;
            }
        }
        return false;
    }