return [$location_filter, $orderBy];
}
- /**
- * @param string $type
- *
- * @return array
- */
- private function _getMailingGroupIds($type = 'Include') {
- $mailingGroup = new CRM_Mailing_DAO_MailingGroup();
- $group = CRM_Contact_DAO_Group::getTableName();
- if (!isset($this->id)) {
- // we're just testing tokens, so return any group
- $query = "SELECT id AS entity_id
- FROM $group
- ORDER BY id
- LIMIT 1";
- }
- else {
- $mg = CRM_Mailing_DAO_MailingGroup::getTableName();
- $query = "SELECT entity_id
- FROM $mg
- WHERE mailing_id = {$this->id}
- AND group_type = '$type'
- AND entity_table = '$group'";
- }
- $mailingGroup->query($query);
-
- $groupIds = [];
- while ($mailingGroup->fetch()) {
- $groupIds[] = $mailingGroup->entity_id;
- }
-
- return $groupIds;
- }
-
/**
* Returns the regex patterns that are used for preparing the text and html templates.
*