本文整理匯總了PHP中CRM_Mailing_BAO_MailingJob::reset方法的典型用法代碼示例。如果您正苦於以下問題:PHP CRM_Mailing_BAO_MailingJob::reset方法的具體用法?PHP CRM_Mailing_BAO_MailingJob::reset怎麽用?PHP CRM_Mailing_BAO_MailingJob::reset使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CRM_Mailing_BAO_MailingJob
的用法示例。
在下文中一共展示了CRM_Mailing_BAO_MailingJob::reset方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getMailingJobs
private static function getMailingJobs($params)
{
if (is_array(static::$jobs)) {
return static::$jobs;
}
static::$jobs = array();
if (empty($params['crm_mailing_id'])) {
return static::$jobs;
}
$jobBao = new CRM_Mailing_BAO_MailingJob();
// This needs to be done as there can only be one query per DAO (see docs for reset()) - without this, the DAO
// object was keeping residual data from previous operations elsewhere on the same DAO, making the below operations
// unpredictable and fail
$jobBao->reset();
// This is needed as the reset() above clears the query completely
$jobBao->selectAdd('*');
$jobBao->mailing_id = $params['crm_mailing_id'];
$jobBao->is_test = 0;
if ($jobBao->find()) {
while ($jobBao->fetch()) {
static::$jobs[] = $jobBao->toArray();
}
}
$jobBao->free();
return static::$jobs;
}