예제 #1
0
 /**
  * Returns the CM IDs for a given list of template IDs
  *
  * @param array $templateIds The ids of the templates.
  * @return array
  */
 public static function getCampaignMonitorIDsForTemplates($templateIds)
 {
     $templates = empty($templateIds) ? array(BackendMailmotorModel::getDefaultTemplateID()) : $templateIds;
     return (array) BackendModel::getContainer()->get('database')->getColumn('SELECT mci.cm_id
          FROM mailmotor_campaignmonitor_ids AS mci
          WHERE mci.type = ? AND mci.other_id IN (' . implode(',', $templates) . ')', array('template'));
 }