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_Report_Interface
{
20 * The constructor gets the submitted form values.
22 * @param array $formValues
24 public function __construct(&$formValues);
27 * Builds the quickform for this search.
29 * @param CRM_Core_Form $form
31 public function buildForm(&$form);
34 * Builds the search query for various cases. We break it down into finer cases
35 * since you can optimize each query independently. All the functions below return
36 * a sql clause with only SELECT, FROM, WHERE sub-parts. The ORDER BY and LIMIT is
37 * added at a later stage
41 * Count of records that match the current input parameters Used by pager.
43 public function count();
46 * Summary information for the query that can be displayed in the template.
48 * This is useful to pass total / sub total information if needed
50 public function summary();
55 * List of contact ids that match the current input parameters
56 * Used by different tasks. Will be also used to optimize the
57 * 'all' query below to avoid excessive LEFT JOIN blowup
60 * @param int $rowcount
63 public function contactIDs($offset = 0, $rowcount = 0, $sort = NULL);
66 * Retrieve all the values that match the current input parameters used by the selector.
69 * @param int $rowcount
71 * @param bool $includeContactIDs
74 $offset = 0, $rowcount = 0, $sort = NULL,
75 $includeContactIDs = FALSE
79 * The below two functions (from and where) are ONLY used if you want to
80 * expose a custom group as a smart group and be able to send a mailing
81 * to them via CiviMail. civicrm_email should be part of the from clause
82 * The from clause should be a valid sql from clause including the word FROM
83 * CiviMail will pick up the contacts where the email is primary and
84 * is not on hold / opt out / do not email
88 * The from clause for the query.
90 public function from();
93 * The where clause for the query.
95 * @param bool $includeContactIDs
97 public function where($includeContactIDs = FALSE);
100 * The template FileName to use to display the results.
102 public function templateFile();
105 * Returns an array of column headers and field names and sort options.
107 public function &columns();