Beispiel #1
0
 /**
  * @return array|null
  */
 public static function &getFields()
 {
     if (!self::$_mailingFields) {
         self::$_mailingFields = array();
         $_mailingFields['mailing_id'] = array('name' => 'mailing_id', 'title' => 'Mailing ID', 'where' => 'civicrm_mailing.id');
     }
     return self::$_mailingFields;
 }
Beispiel #2
0
 /**
  * Class constructor.
  *
  * @param array $queryParams
  *   Array of parameters for query.
  * @param \const|int $action - action of search basic or advanced.
  * @param string $mailingClause
  *   If the caller wants to further restrict the search.
  * @param bool $single
  *   Are we dealing only with one contact?.
  * @param int $limit
  *   How many mailing do we want returned.
  *
  * @param string $context
  * @param null $compContext
  *
  * @return \CRM_Mailing_Selector_Search
  */
 public function __construct(&$queryParams, $action = CRM_Core_Action::NONE, $mailingClause = NULL, $single = FALSE, $limit = NULL, $context = 'search', $compContext = NULL)
 {
     // submitted form values
     $this->_queryParams =& $queryParams;
     $this->_single = $single;
     $this->_limit = $limit;
     $this->_context = $context;
     $this->_compContext = $compContext;
     $this->_mailingClause = $mailingClause;
     // type of selector
     $this->_action = $action;
     $this->_query = new CRM_Contact_BAO_Query($this->_queryParams, CRM_Mailing_BAO_Query::defaultReturnProperties(CRM_Contact_BAO_Query::MODE_MAILING, FALSE), NULL, FALSE, FALSE, CRM_Contact_BAO_Query::MODE_MAILING);
     $this->_query->_distinctComponentClause = " civicrm_mailing_recipients.id ";
 }