本文整理匯總了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;
示例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));
}