当前位置: 首页>>代码示例>>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;未经允许,请勿转载。