本文整理匯總了PHP中CApi::GetModules方法的典型用法代碼示例。如果您正苦於以下問題:PHP CApi::GetModules方法的具體用法?PHP CApi::GetModules怎麽用?PHP CApi::GetModules使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CApi
的用法示例。
在下文中一共展示了CApi::GetModules方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getMap
/**
* @return array
*/
public function getMap()
{
if (!isset($this->aMap)) {
$aStaticMap = $this->getStaticMap();
foreach (\CApi::GetModules() as $oModule) {
$aStaticMap = array_merge($aStaticMap, $oModule->getObjectMap($this->sClassName));
}
$this->aMap = $aStaticMap;
}
return $this->aMap;
}
示例2: appData
/**
* @param string $sHelpdeskTenantHash Default value is empty string.
* @param string $sCalendarPubHash Default value is empty string.
* @param string $sFileStoragePubHash Default value is empty string.
* @param string $sAuthToken Default value is empty string.
*
* @return array
*/
public function appData()
{
$aAppData = array('User' => array('Id' => 0, 'Role' => \EUserRole::Anonymous, 'Name' => ''), 'IsMobile' => 0, 'AllowMobile' => false, 'IsMailsuite' => false, 'ClientDebug' => \CApi::GetConf('labs.webmail-client-debug', false), 'MailExpandFolders' => \CApi::GetConf('labs.mail-expand-folders', false), 'HtmlEditorDefaultFontName' => \CApi::GetConf('labs.htmleditor-default-font-name', ''), 'HtmlEditorDefaultFontSize' => \CApi::GetConf('labs.htmleditor-default-font-size', ''), 'AllowSaveAsPdf' => !!\CApi::GetConf('labs.allow-save-as-pdf', false), 'LastErrorCode' => $this->getLastErrorCode(), 'ZipAttachments' => !!class_exists('ZipArchive'), 'AllowIdentities' => !!$this->oSettings->GetConf('WebMail/AllowIdentities'), 'SocialEmail' => '', 'SocialIsLoggedIn' => false, 'Links' => array('OutlookSyncPlugin32' => \CApi::GetConf('links.outlook-sync-plugin-32', ''), 'OutlookSyncPlugin64' => \CApi::GetConf('links.outlook-sync-plugin-64', ''), 'OutlookSyncPluginReadMore' => \CApi::GetConf('links.outlook-sync-read-more', '')), 'TenantName' => \CApi::getTenantName());
if (0 < $aAppData['LastErrorCode']) {
$this->clearLastErrorCode();
}
// AuthToken reads from coockie for HTML
$sAuthToken = isset($_COOKIE[\System\Service::AUTH_TOKEN_KEY]) ? $_COOKIE[\System\Service::AUTH_TOKEN_KEY] : '';
$oUser = \CApi::getAuthenticatedUser($sAuthToken);
$aModules = \CApi::GetModules();
foreach ($aModules as $oModule) {
$aModuleAppData = $oModule->GetSettings();
if (is_array($aModuleAppData)) {
$aAppData[$oModule->GetName()] = $aModuleAppData;
}
}
if ($oUser) {
$aAppData['User'] = array('Id' => $oUser->iId, 'Role' => $oUser->Role, 'Name' => $oUser->Name);
}
$sDisabledModules = isset($oUser->{'@DisabledModules'}) ? $oUser->{'@DisabledModules'} : '';
$aDisabledModules = !empty(trim($sDisabledModules)) ? array($sDisabledModules) : array();
if (substr_count($sDisabledModules, "|") > 0) {
$aDisabledModules = explode("|", $sDisabledModules);
}
$aAppData['DisabledModules'] = $aDisabledModules;
return $aAppData;
}