Commit | Line | Data |
---|---|---|
6a488035 | 1 | <?php |
6a488035 TO |
2 | /* |
3 | +--------------------------------------------------------------------+ | |
fee14197 | 4 | | CiviCRM version 5 | |
6a488035 | 5 | +--------------------------------------------------------------------+ |
8c9251b3 | 6 | | Copyright CiviCRM LLC (c) 2004-2018 | |
6a488035 TO |
7 | +--------------------------------------------------------------------+ |
8 | | This file is a part of CiviCRM. | | |
9 | | | | |
10 | | CiviCRM is free software; you can copy, modify, and distribute it | | |
11 | | under the terms of the GNU Affero General Public License | | |
12 | | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. | | |
13 | | | | |
14 | | CiviCRM is distributed in the hope that it will be useful, but | | |
15 | | WITHOUT ANY WARRANTY; without even the implied warranty of | | |
16 | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | | |
17 | | See the GNU Affero General Public License for more details. | | |
18 | | | | |
19 | | You should have received a copy of the GNU Affero General Public | | |
20 | | License and the CiviCRM Licensing Exception along | | |
21 | | with this program; if not, contact CiviCRM LLC | | |
22 | | at info[AT]civicrm[DOT]org. If you have questions about the | | |
23 | | GNU Affero General Public License or the licensing of CiviCRM, | | |
24 | | see the CiviCRM license FAQ at http://civicrm.org/licensing | | |
25 | +--------------------------------------------------------------------+ | |
d25dd0ee | 26 | */ |
6a488035 TO |
27 | |
28 | /** | |
29 | * | |
30 | * @package CRM | |
8c9251b3 | 31 | * @copyright CiviCRM LLC (c) 2004-2018 |
6a488035 TO |
32 | */ |
33 | interface CRM_Report_Interface { | |
34 | ||
35 | /** | |
fe482240 | 36 | * The constructor gets the submitted form values. |
ab432335 | 37 | * |
ad37ac8e | 38 | * @param array $formValues |
6a488035 | 39 | */ |
00be9182 | 40 | public function __construct(&$formValues); |
6a488035 TO |
41 | |
42 | /** | |
fe482240 | 43 | * Builds the quickform for this search. |
ad37ac8e | 44 | * |
45 | * @param CRM_Core_Form $form | |
6a488035 | 46 | */ |
00be9182 | 47 | public function buildForm(&$form); |
6a488035 TO |
48 | |
49 | /** | |
50 | * Builds the search query for various cases. We break it down into finer cases | |
51 | * since you can optimize each query independently. All the functions below return | |
52 | * a sql clause with only SELECT, FROM, WHERE sub-parts. The ORDER BY and LIMIT is | |
53 | * added at a later stage | |
54 | */ | |
55 | ||
56 | /** | |
ad37ac8e | 57 | * Count of records that match the current input parameters Used by pager. |
6a488035 | 58 | */ |
00be9182 | 59 | public function count(); |
6a488035 TO |
60 | |
61 | /** | |
ad37ac8e | 62 | * Summary information for the query that can be displayed in the template. |
63 | * | |
6a488035 TO |
64 | * This is useful to pass total / sub total information if needed |
65 | */ | |
00be9182 | 66 | public function summary(); |
6a488035 TO |
67 | |
68 | /** | |
54957108 | 69 | * Get contact IDs. |
70 | * | |
6a488035 TO |
71 | * List of contact ids that match the current input parameters |
72 | * Used by different tasks. Will be also used to optimize the | |
73 | * 'all' query below to avoid excessive LEFT JOIN blowup | |
54957108 | 74 | * |
75 | * @param int $offset | |
76 | * @param int $rowcount | |
77 | * @param string $sort | |
6a488035 | 78 | */ |
00be9182 | 79 | public function contactIDs($offset = 0, $rowcount = 0, $sort = NULL); |
6a488035 TO |
80 | |
81 | /** | |
54957108 | 82 | * Retrieve all the values that match the current input parameters used by the selector. |
83 | * | |
84 | * @param int $offset | |
85 | * @param int $rowcount | |
86 | * @param string $sort | |
87 | * @param bool $includeContactIDs | |
6a488035 | 88 | */ |
a130e045 | 89 | public function all( |
7d8c1168 | 90 | $offset = 0, $rowcount = 0, $sort = NULL, |
6a488035 TO |
91 | $includeContactIDs = FALSE |
92 | ); | |
93 | ||
94 | /** | |
95 | * The below two functions (from and where) are ONLY used if you want to | |
96 | * expose a custom group as a smart group and be able to send a mailing | |
97 | * to them via CiviMail. civicrm_email should be part of the from clause | |
98 | * The from clause should be a valid sql from clause including the word FROM | |
99 | * CiviMail will pick up the contacts where the email is primary and | |
100 | * is not on hold / opt out / do not email | |
6a488035 TO |
101 | */ |
102 | ||
103 | /** | |
fe482240 | 104 | * The from clause for the query. |
6a488035 | 105 | */ |
00be9182 | 106 | public function from(); |
6a488035 TO |
107 | |
108 | /** | |
fe482240 | 109 | * The where clause for the query. |
54957108 | 110 | * |
111 | * @param bool $includeContactIDs | |
6a488035 | 112 | */ |
00be9182 | 113 | public function where($includeContactIDs = FALSE); |
6a488035 TO |
114 | |
115 | /** | |
fe482240 | 116 | * The template FileName to use to display the results. |
6a488035 | 117 | */ |
00be9182 | 118 | public function templateFile(); |
6a488035 TO |
119 | |
120 | /** | |
fe482240 | 121 | * Returns an array of column headers and field names and sort options. |
6a488035 | 122 | */ |
00be9182 | 123 | public function &columns(); |
96025800 | 124 | |
6a488035 | 125 | } |