本文整理汇总了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>';
}
}