3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
15 * @copyright CiviCRM LLC https://civicrm.org/licensing
17 interface CRM_Contact_Form_Search_Interface
{
20 * The constructor gets the submitted form values.
22 * @param array $formValues
24 public function __construct(&$formValues);
27 * Builds the list of tasks or actions that a searcher can perform on a result set.
29 * @param CRM_Core_Form_Search $form
32 public function buildTaskList(CRM_Core_Form_Search
$form);
35 * Builds the quickform for this search.
37 * @param CRM_Core_Form $form
39 public function buildForm(&$form);
42 * Builds the search query for various cases. We break it down into finer cases
43 * since you can optimize each query independently. All the functions below return
44 * a sql clause with only SELECT, FROM, WHERE sub-parts. The ORDER BY and LIMIT is
45 * added at a later stage
49 * Count of records that match the current input parameters.
53 public function count();
56 * Summary information for the query that can be displayed in the template.
58 * This is useful to pass total / sub total information if needed
60 public function summary();
63 * List of contact ids that match the current input parameters.
65 * Used by different tasks. Will be also used to optimize the
66 * 'all' query below to avoid excessive LEFT JOIN blowup
69 * @param int $rowcount
72 public function contactIDs($offset = 0, $rowcount = 0, $sort = NULL);
75 * Retrieve all the values that match the current input parameters.
77 * Used by the selector
80 * @param int $rowcount
82 * @param bool $includeContactIDs
83 * @param bool $justIDs
85 public function all($offset = 0, $rowcount = 0, $sort = NULL, $includeContactIDs = FALSE, $justIDs = FALSE);
88 * The below two functions (from and where) are ONLY used if you want to
89 * expose a custom group as a smart group and be able to send a mailing
90 * to them via CiviMail. civicrm_email should be part of the from clause
91 * The from clause should be a valid sql from clause including the word FROM
92 * CiviMail will pick up the contacts where the email is primary and
93 * is not on hold / opt out / do not email
97 * The from clause for the query.
99 public function from();
102 * The where clause for the query.
104 * @param bool $includeContactIDs
106 public function where($includeContactIDs = FALSE);
109 * The template FileName to use to display the results.
111 public function templateFile();
114 * Returns an array of column headers and field names and sort options.
116 public function &columns();