当前位置: 首页>>代码示例>>PHP>>正文


PHP EmailMarketing::save方法代码示例

本文整理汇总了PHP中EmailMarketing::save方法的典型用法代码示例。如果您正苦于以下问题:PHP EmailMarketing::save方法的具体用法?PHP EmailMarketing::save怎么用?PHP EmailMarketing::save使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在EmailMarketing的用法示例。


在下文中一共展示了EmailMarketing::save方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: trim

        }
    } else {
        if (isset($_REQUEST[$field])) {
            $value = $_REQUEST[$field];
            $marketing->{$field} = trim($value);
        }
    }
}
foreach ($marketing->additional_column_fields as $field) {
    if (isset($_REQUEST[$field])) {
        $value = $_REQUEST[$field];
        $marketing->{$field} = $value;
    }
}
$marketing->campaign_id = $_REQUEST['campaign_id'];
$marketing->save($check_notify);
//add prospect lists to campaign.
$marketing->load_relationship('prospectlists');
$prospectlists = $marketing->prospectlists->get();
if ($marketing->all_prospect_lists == 1) {
    //remove all related prospect lists.
    if (!empty($prospectlists)) {
        $marketing->prospectlists->delete($marketing->id);
    }
} else {
    if (isset($_REQUEST['message_for']) && is_array($_REQUEST['message_for'])) {
        foreach ($_REQUEST['message_for'] as $prospect_list_id) {
            $key = array_search($prospect_list_id, $prospectlists);
            if ($key === null or $key === false) {
                $marketing->prospectlists->add($prospect_list_id);
            } else {
开发者ID:NALSS,项目名称:SuiteCRM,代码行数:31,代码来源:WizardMarketingSave.php

示例2: json_encode

 *
 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
 * these Appropriate Legal Notices must retain the display of the "Powered by
 * SugarCRM" logo and "Supercharged by SuiteCRM" logo. If the display of the logos is not
 * reasonably feasible for  technical reasons, the Appropriate Legal Notices must
 * display the words  "Powered by SugarCRM" and "Supercharged by SuiteCRM".
 ********************************************************************************/

global $db;

$campaignId = $db->quote($_POST['campaignId']);
$marketingId = $db->quote($_POST['marketingId']);
if(!empty($_POST['templateId'])) {
    $templateId = $db->quote($_POST['templateId']);
}

//$campaign = new Campaign();
//$campaign->retrieve($campaignId);

$marketing = new EmailMarketing();
$marketing->retrieve($marketingId);
$marketing->campaign_id = $campaignId;
if(!empty($_POST['templateId'])) {
    $marketing->template_id = $templateId;
}
$marketing->save();

$_SESSION['campaignWizardSelectedMarketingId'] = $marketing->id;

echo json_encode($_POST);
开发者ID:auf,项目名称:crm_auf_org,代码行数:30,代码来源:WizardCampaignSave.php


注:本文中的EmailMarketing::save方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。