Commit | Line | Data |
---|---|---|
6a488035 | 1 | <?php |
6a488035 TO |
2 | /* |
3 | +--------------------------------------------------------------------+ | |
bc77d7c0 | 4 | | Copyright CiviCRM LLC. All rights reserved. | |
6a488035 | 5 | | | |
bc77d7c0 TO |
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 | | |
6a488035 | 9 | +--------------------------------------------------------------------+ |
d25dd0ee | 10 | */ |
6a488035 TO |
11 | |
12 | /** | |
13 | * | |
14 | * @package CRM | |
ca5cec67 | 15 | * @copyright CiviCRM LLC https://civicrm.org/licensing |
6a488035 TO |
16 | */ |
17 | interface CRM_Report_Interface { | |
18 | ||
19 | /** | |
fe482240 | 20 | * The constructor gets the submitted form values. |
ab432335 | 21 | * |
ad37ac8e | 22 | * @param array $formValues |
6a488035 | 23 | */ |
00be9182 | 24 | public function __construct(&$formValues); |
6a488035 TO |
25 | |
26 | /** | |
fe482240 | 27 | * Builds the quickform for this search. |
ad37ac8e | 28 | * |
29 | * @param CRM_Core_Form $form | |
6a488035 | 30 | */ |
00be9182 | 31 | public function buildForm(&$form); |
6a488035 TO |
32 | |
33 | /** | |
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 | |
38 | */ | |
39 | ||
40 | /** | |
ad37ac8e | 41 | * Count of records that match the current input parameters Used by pager. |
6a488035 | 42 | */ |
00be9182 | 43 | public function count(); |
6a488035 TO |
44 | |
45 | /** | |
ad37ac8e | 46 | * Summary information for the query that can be displayed in the template. |
47 | * | |
6a488035 TO |
48 | * This is useful to pass total / sub total information if needed |
49 | */ | |
00be9182 | 50 | public function summary(); |
6a488035 TO |
51 | |
52 | /** | |
54957108 | 53 | * Get contact IDs. |
54 | * | |
6a488035 TO |
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 | |
54957108 | 58 | * |
59 | * @param int $offset | |
60 | * @param int $rowcount | |
61 | * @param string $sort | |
6a488035 | 62 | */ |
00be9182 | 63 | public function contactIDs($offset = 0, $rowcount = 0, $sort = NULL); |
6a488035 TO |
64 | |
65 | /** | |
54957108 | 66 | * Retrieve all the values that match the current input parameters used by the selector. |
67 | * | |
68 | * @param int $offset | |
69 | * @param int $rowcount | |
70 | * @param string $sort | |
71 | * @param bool $includeContactIDs | |
6a488035 | 72 | */ |
a130e045 | 73 | public function all( |
7d8c1168 | 74 | $offset = 0, $rowcount = 0, $sort = NULL, |
6a488035 TO |
75 | $includeContactIDs = FALSE |
76 | ); | |
77 | ||
78 | /** | |
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 | |
6a488035 TO |
85 | */ |
86 | ||
87 | /** | |
fe482240 | 88 | * The from clause for the query. |
6a488035 | 89 | */ |
00be9182 | 90 | public function from(); |
6a488035 TO |
91 | |
92 | /** | |
fe482240 | 93 | * The where clause for the query. |
54957108 | 94 | * |
95 | * @param bool $includeContactIDs | |
6a488035 | 96 | */ |
00be9182 | 97 | public function where($includeContactIDs = FALSE); |
6a488035 TO |
98 | |
99 | /** | |
fe482240 | 100 | * The template FileName to use to display the results. |
6a488035 | 101 | */ |
00be9182 | 102 | public function templateFile(); |
6a488035 TO |
103 | |
104 | /** | |
fe482240 | 105 | * Returns an array of column headers and field names and sort options. |
6a488035 | 106 | */ |
00be9182 | 107 | public function &columns(); |
96025800 | 108 | |
6a488035 | 109 | } |