コード例 #1
0
 /**
  * Class constructor.
  *
  * @param array $queryParams
  *   Array of parameters for query.
  * @param \const|int $action - action of search basic or advanced.
  * @param string $additionalClause
  *   If the caller wants to further restrict the search (used in participations).
  * @param bool $single
  *   Are we dealing only with one contact?.
  * @param int $limit
  *   How many signers do we want returned.
  *
  * @param string $context
  *
  * @return \CRM_Case_Selector_Search
  */
 public function __construct(&$queryParams, $action = CRM_Core_Action::NONE, $additionalClause = NULL, $single = FALSE, $limit = NULL, $context = 'search')
 {
     // submitted form values
     $this->_queryParams =& $queryParams;
     $this->_single = $single;
     $this->_limit = $limit;
     $this->_context = $context;
     $this->_additionalClause = $additionalClause;
     // type of selector
     $this->_action = $action;
     $this->_query = new CRM_Contact_BAO_Query($this->_queryParams, CRM_Case_BAO_Query::defaultReturnProperties(CRM_Contact_BAO_Query::MODE_CASE, FALSE), NULL, FALSE, FALSE, CRM_Contact_BAO_Query::MODE_CASE);
     $this->_query->_distinctComponentClause = " civicrm_case.id ";
     $this->_query->_groupByComponentClause = " GROUP BY civicrm_case.id ";
 }