本文整理汇总了PHP中EmailMarketing::validate方法的典型用法代码示例。如果您正苦于以下问题:PHP EmailMarketing::validate方法的具体用法?PHP EmailMarketing::validate怎么用?PHP EmailMarketing::validate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EmailMarketing
的用法示例。
在下文中一共展示了EmailMarketing::validate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: EmailMarketing
if (!$marketingId) {
if (!empty($_SESSION['campaignWizard'][$campaignId]['defaultSelectedMarketingId']) && $func != 'createEmailMarketing') {
$marketingId = $_SESSION['campaignWizard'][$campaignId]['defaultSelectedMarketingId'];
} else {
if ($func != 'createEmailMarketing') {
$marketing = new EmailMarketing();
$marketing->save();
$marketingId = $marketing->id;
}
}
}
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;
}
if ($func != 'createEmailMarketing') {
$marketing->save();
}
$_SESSION['campaignWizard'][$campaignId]['defaultSelectedMarketingId'] = $marketing->id;
$return = $_POST;
$return['templateValidationMessages'] = getTemplateValidationMessages($marketing->template_id);
$return['marketingValidationMessages'] = $marketing->validate();
echo json_encode($return);
}