本文整理汇总了PHP中CRM_Mailing_BAO_MailingJob::toArray方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Mailing_BAO_MailingJob::toArray方法的具体用法?PHP CRM_Mailing_BAO_MailingJob::toArray怎么用?PHP CRM_Mailing_BAO_MailingJob::toArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Mailing_BAO_MailingJob
的用法示例。
在下文中一共展示了CRM_Mailing_BAO_MailingJob::toArray方法的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;
}