本文整理匯總了PHP中CApi::VersionJs方法的典型用法代碼示例。如果您正苦於以下問題:PHP CApi::VersionJs方法的具體用法?PHP CApi::VersionJs怎麽用?PHP CApi::VersionJs使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CApi
的用法示例。
在下文中一共展示了CApi::VersionJs方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: buildBody
/**
* @param string $sWebPath Default value is **'.'**.
* @param bool $bHelpdesk Default value is **false**.
* @param int $iHelpdeskIdTenant Default value is **null**.
* @param string $sHelpdeskHash Default value is empty string.
* @param string $sCalendarPubHash Default value is empty string.
* @param string $sFileStoragePubHash Default value is empty string.
* @param bool $bMobile Default value is **false**.
*
* @return string
*/
public function buildBody($sWebPath = '.', $bHelpdesk = false, $iHelpdeskIdTenant = null, $sHelpdeskHash = '', $sCalendarPubHash = '', $sFileStoragePubHash = '', $bMobile = false)
{
list($sLanguage, $sTheme, $sSiteName) = $this->getThemeAndLanguage();
$sMobileSuffix = $bMobile && !$bHelpdesk ? '-mobile' : '';
$sWebPath = empty($sWebPath) ? '.' : $sWebPath;
return '<div class="pSevenMain"><div id="pSevenLoading"></div><div id="pSevenContent"></div><div id="pSevenHidden"></div>' . '<div>' . $this->compileTemplates($sTheme, $bMobile) . '<script src="' . $sWebPath . '/static/js/libs.js?' . CApi::VersionJs() . '"></script>' . $this->compileLanguage($sLanguage) . $this->compileAppData($bHelpdesk, $iHelpdeskIdTenant, $sHelpdeskHash, $sCalendarPubHash, $sFileStoragePubHash) . '<script src="' . $sWebPath . '/static/js/app' . $sMobileSuffix . ($bHelpdesk ? '-helpdesk' : (empty($sCalendarPubHash) ? empty($sFileStoragePubHash) ? '' : '-filestorage-pub' : '-calendar-pub')) . (CApi::GetConf('labs.use-app-min-js', false) ? '.min' : '') . '.js?' . CApi::VersionJs() . '"></script>' . (CApi::Plugin()->HasJsFiles() ? '<script src="?/Plugins/js/' . CApi::Plugin()->Hash() . '/"></script>' : '') . '</div></div>' . "\r\n" . '<!-- ' . CApi::Version() . ' -->';
}
示例2: getJsLinks
/**
* Returns css links for building in html.
*
* @param string $sModuleHash
* @return string
*/
public function getJsLinks($sModuleHash)
{
$sPostfix = '';
if ($sModuleHash !== '') {
$sPostfix = $sModuleHash;
}
if (CApi::GetConf('labs.use-app-min-js', false)) {
$sPostfix = $sPostfix . '.min';
}
$sTenantName = \CApi::getTenantName();
$oSettings =& CApi::GetSettings();
if ($oSettings->GetConf('EnableMultiTenant') && $sTenantName) {
return '<script src="./tenants/' . $sTenantName . '/static/js/app' . $sPostfix . '.js?' . CApi::VersionJs() . '"></script>';
} else {
return '<script src="./static/js/app' . $sPostfix . '.js?' . CApi::VersionJs() . '"></script>';
}
}