/** * @param $templateFile * @return bool|string */ public function getTemplateFilePath($templateFile) { if (strpos(strtolower($templateFile), '.tpl') === false) { $templateFile .= '.tpl'; } $folders = $this->getTemplateFolders(); foreach ($folders as $folder) { if (is_file($file = $folder . DIRECTORY_SEPARATOR . $templateFile)) { return $file; } elseif (is_file($file = $folder . DIRECTORY_SEPARATOR . $this->core->createDirNameFromClassName($this->moduleName) . DIRECTORY_SEPARATOR . basename(str_replace(['/', '\\'], DIRECTORY_SEPARATOR, $templateFile)))) { return $file; } elseif (is_file($templateFile)) { return realpath($templateFile); } } return false; }