コード例 #1
0
ファイル: Templates.php プロジェクト: sintoris/Known
 /**
  * Does the specified template type exist?
  * @param string Name of the template type
  * @return true|false
  */
 function templateTypeExists($templateType)
 {
     $templateType = preg_replace('/^_[A-Z0-9\\/]+/i', '', $templateType);
     if (!empty($templateType)) {
         $paths = \Bonita\Main::getPaths();
         foreach ($paths as $basepath) {
             $path = $basepath . '/templates/' . $templateType . '/';
             if (file_exists($path)) {
                 return true;
             }
         }
     }
     return false;
 }