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


PHP InboundEmail::createAutoImportSugarFolder方法代碼示例

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


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

示例1: SugarFolder

$storedOptions['folderDelimiter'] = $delimiter;
////////////////////////////////////////////////////////////////////////////////
////    CREATE MAILBOX QUEUE
////////////////////////////////////////////////////////////////////////////////
if (!isset($focus->id)) {
    $groupId = "";
    if (isset($_REQUEST['group_id']) && empty($_REQUEST['group_id'])) {
        $groupId = $_REQUEST['group_id'];
    } else {
        $groupId = create_guid();
    }
    $focus->group_id = $groupId;
}
if (isset($_REQUEST['is_auto_import']) && $_REQUEST['is_auto_import'] == 'on') {
    if (empty($focus->groupfolder_id)) {
        $groupFolderId = $focus->createAutoImportSugarFolder();
        $focus->groupfolder_id = $groupFolderId;
    }
    $stored_options['isAutoImport'] = true;
} else {
    $focus->groupfolder_id = "";
    //If the user is turning the auto-import feature off then remove all previous subscriptions.
    if (!empty($focus->fetched_row['groupfolder_id'])) {
        $GLOBALS['log']->debug("Clearining all subscriptions to folder id: {$focus->fetched_row['groupfolder_id']}");
        $f = new SugarFolder();
        $f->clearSubscriptionsForFolder($focus->fetched_row['groupfolder_id']);
        //Now delete the old group folder.
        $f->retrieve($focus->fetched_row['groupfolder_id']);
        $f->delete();
    }
    $stored_options['isAutoImport'] = false;
開發者ID:MexinaD,項目名稱:SuiteCRM,代碼行數:31,代碼來源:Save.php

示例2: testcreateAutoImportSugarFolder

 public function testcreateAutoImportSugarFolder()
 {
     //unset and reconnect Db to resolve mysqli fetch exeception
     global $db;
     unset($db->database);
     $db->checkConnection();
     $inboundEmail = new InboundEmail();
     $inboundEmail->name = 'test';
     $result = $inboundEmail->createAutoImportSugarFolder();
     //test for record ID to verify that record is saved
     $this->assertTrue(isset($result));
     $this->assertEquals(36, strlen($result));
 }
開發者ID:sacredwebsite,項目名稱:SuiteCRM,代碼行數:13,代碼來源:InboundEmailTest.php


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