private static function _findJsFile($sTemplate) { if ($aDirs = M::TEMPLATE_JS()) { foreach ($aDirs as $sDir) { $sPath = M::PROJECT_ROOT() . '/' . $sDir . '/tpl.' . $sTemplate . '.js'; if (file_exists($sPath)) { self::$_aJs[$sTemplate] = $sPath; return; } } } }