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


PHP EmailMarketing::load_relationship方法代碼示例

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


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

示例1: array

    $ss->assign("TEMPLATE_ID", $mrkt_focus->template_id);
    $ss->assign("EMAIL_TEMPLATE_OPTIONS", get_select_options_with_id($email_templates_arr, $mrkt_focus->template_id));
    $ss->assign("EDIT_TEMPLATE", "visibility:inline");
} else {
    $ss->assign("EMAIL_TEMPLATE_OPTIONS", get_select_options_with_id($email_templates_arr, ""));
    $ss->assign("EDIT_TEMPLATE", "visibility:hidden");
}
$scope_options = get_message_scope_dom($campaign_focus->id, $campaign_focus->name, $mrkt_focus->db);
$prospectlists = array();
if (isset($mrkt_focus->all_prospect_lists) && $mrkt_focus->all_prospect_lists == 1) {
    $ss->assign("ALL_PROSPECT_LISTS_CHECKED", "checked");
    $ss->assign("MESSAGE_FOR_DISABLED", "disabled");
} else {
    //get select prospect list.
    if (!empty($mrkt_focus->id)) {
        $mrkt_focus->load_relationship('prospectlists');
        $prospectlists = $mrkt_focus->prospectlists->get();
    }
}
if (empty($prospectlists)) {
    $prospectlists = array();
}
if (empty($scope_options)) {
    $scope_options = array();
}
$ss->assign("SCOPE_OPTIONS", get_select_options_with_id($scope_options, $prospectlists));
$ss->assign("SAVE_CONFIRM_MESSAGE", $mod_strings['LBL_CONFIRM_SEND_SAVE']);
$javascript = new javascript();
$javascript->setFormName('wizform');
$javascript->setSugarBean($mrkt_focus);
$javascript->addAllFields('');
開發者ID:aldridged,項目名稱:gtg-sugar,代碼行數:31,代碼來源:WizardMarketing.php

示例2: trim

        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 {
                unset($prospectlists[$key]);
            }
開發者ID:NALSS,項目名稱:SuiteCRM,代碼行數:31,代碼來源:WizardMarketingSave.php


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