當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ConnectorUtils::eapmEnabled方法代碼示例

本文整理匯總了PHP中ConnectorUtils::eapmEnabled方法的典型用法代碼示例。如果您正苦於以下問題:PHP ConnectorUtils::eapmEnabled方法的具體用法?PHP ConnectorUtils::eapmEnabled怎麽用?PHP ConnectorUtils::eapmEnabled使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ConnectorUtils的用法示例。


在下文中一共展示了ConnectorUtils::eapmEnabled方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: filterAPIList

 /**
  * Filter the list of APIs, removing disabled ones
  * @param array $apiFullList
  * @return array Filtered list
  */
 public static function filterAPIList($apiFullList)
 {
     $filteredList = array();
     foreach ($apiFullList as $name => $data) {
         if (isset($data['connector'])) {
             if (ConnectorUtils::eapmEnabled($data['connector'])) {
                 if (isset($data['authMethod']) && $data['authMethod'] == 'oauth') {
                     $connector = SourceFactory::getSource($data['connector'], false);
                     if (!empty($connector) && $connector->propertyExists('oauth_consumer_key') && $connector->isRequiredConfigFieldsSet()) {
                         $filteredList[$name] = $data;
                     }
                 } elseif (isset($data['authMethod']) && $data['authMethod'] == 'oauth2') {
                     $connector = SourceFactory::getSource($data['connector'], false);
                     if (!empty($connector) && $connector->isRequiredConfigFieldsSet()) {
                         $filteredList[$name] = $data;
                     }
                 } else {
                     $filteredList[$name] = $data;
                 }
             }
         } else {
             $filteredList[$name] = $data;
         }
     }
     return $filteredList;
 }
開發者ID:delkyd,項目名稱:sugarcrm_dev,代碼行數:31,代碼來源:ExternalAPIFactory.php

示例2: filterAPIList

 /**
  * Filter the list of APIs, removing disabled ones
  * @param array $apiFullList
  * @return array Filtered list
  */
 public static function filterAPIList($apiFullList)
 {
     $filteredList = array();
     foreach ($apiFullList as $name => $data) {
         if (isset($data['connector'])) {
             if (ConnectorUtils::eapmEnabled($data['connector'])) {
                 if (isset($data['authMethod']) && $data['authMethod'] == 'oauth') {
                     $connector = SourceFactory::getSource($data['connector'], false);
                     if (!empty($connector)) {
                         $key = $connector->getProperty('oauth_consumer_key');
                         $secret = $connector->getProperty('oauth_consumer_secret');
                         if (!empty($key) && !empty($secret)) {
                             $filteredList[$name] = $data;
                         }
                     }
                 } else {
                     $filteredList[$name] = $data;
                 }
             }
         } else {
             $filteredList[$name] = $data;
         }
     }
     return $filteredList;
 }
開發者ID:sysraj86,項目名稱:carnivalcrm,代碼行數:30,代碼來源:ExternalAPIFactory.php

示例3: array

 * Copyright (C) SugarCRM Inc. All rights reserved.
 */
$lotusLiveUrl = '';
$llNowButton = '';
if (!isset($dynamicDCActions) || !is_array($dynamicDCActions)) {
    $dynamicDCActions = array();
}
if (isset($_SESSION['current_db_version']) && isset($_SESSION['target_db_version']) && version_compare($_SESSION['current_db_version'], $_SESSION['target_db_version'], '!=')) {
    // check if we are in upgrade. If yes, skip EAPM for now, until the DB is upgraded
    return;
}
require_once 'include/connectors/utils/ConnectorUtils.php';
require_once 'include/connectors/sources/SourceFactory.php';
$connector = SourceFactory::getSource('ext_eapm_ibmsmartcloud', false);
// Check if IBM SmartCloud (was Lotus Live) is configured and enabled
if (!empty($connector) && $connector->propertyExists('oauth_consumer_key') && $connector->propertyExists('oauth_consumer_secret') && ConnectorUtils::eapmEnabled('ext_eapm_ibmsmartcloud')) {
    // All we need is ibm smartcloud url
    require_once 'modules/EAPM/EAPM.php';
    $eapmBean = EAPM::getLoginInfo('IBMSmartCloud');
    if (!empty($eapmBean->api_data)) {
        $api_data = json_decode(base64_decode($eapmBean->api_data), true);
        if (isset($api_data['hostURL'])) {
            $lotusLiveUrl = $api_data['hostURL'];
            $lotusLiveMeetNowLabel = translate('LBL_MEET_NOW_BUTTON', 'EAPM');
            $llNowButton = '<button onclick=\\\'DCMenu.hostMeeting();\\\'>' . $lotusLiveMeetNowLabel . '</button>';
            $dynamicDCActions['LotusLiveMeetings'] = array('module' => 'Meetings', 'label' => translate('LBL_VIEW_LOTUS_LIVE_MEETINGS', 'EAPM'), 'action' => "DCMenu.hostMeetingUrl='" . $lotusLiveUrl . "'; DCMenu.loadView('" . translate('LBL_TITLE_LOTUS_LIVE_MEETINGS', 'EAPM') . "','index.php?module=Meetings&action=listbytype&type=IBMSmartCloud',undefined,undefined,undefined,'" . $llNowButton . "');", 'icon' => 'icon_LotusMeetings_footer_bar.png');
            $dynamicDCActions['LotusLiveDocuments'] = array('module' => 'Documents', 'label' => translate('LBL_VIEW_LOTUS_LIVE_DOCUMENTS', 'EAPM'), 'action' => 'DCMenu.loadView(\'' . translate('LBL_TITLE_LOTUS_LIVE_DOCUMENTS', 'EAPM') . '\',\'index.php?module=Documents&action=extdoc&type=IBMSmartCloud\');', 'icon' => 'icon_LotusDocuments_footer_bar.png');
        }
    }
    // Display alert if not connected
    $_SESSION['display_lotuslive_alert'] = empty($eapmBean);
開發者ID:jglaine,項目名稱:sugar761-ent,代碼行數:31,代碼來源:DynamicDCActions.php


注:本文中的ConnectorUtils::eapmEnabled方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。