Commit | Line | Data |
---|---|---|
6a488035 | 1 | <?php |
6a488035 TO |
2 | /* |
3 | +--------------------------------------------------------------------+ | |
7e9e8871 | 4 | | CiviCRM version 4.7 | |
6a488035 | 5 | +--------------------------------------------------------------------+ |
e7112fa7 | 6 | | Copyright CiviCRM LLC (c) 2004-2015 | |
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 | |
e7112fa7 | 31 | * @copyright CiviCRM LLC (c) 2004-2015 |
6a488035 TO |
32 | * $Id$ |
33 | * | |
34 | */ | |
35 | interface CRM_Report_Interface { | |
36 | ||
37 | /** | |
fe482240 | 38 | * The constructor gets the submitted form values. |
ab432335 EM |
39 | * |
40 | * @param $formValues | |
6a488035 | 41 | */ |
00be9182 | 42 | public function __construct(&$formValues); |
6a488035 TO |
43 | |
44 | /** | |
fe482240 | 45 | * Builds the quickform for this search. |
ab432335 | 46 | * @param $form |
6a488035 | 47 | */ |
00be9182 | 48 | public function buildForm(&$form); |
6a488035 TO |
49 | |
50 | /** | |
51 | * Builds the search query for various cases. We break it down into finer cases | |
52 | * since you can optimize each query independently. All the functions below return | |
53 | * a sql clause with only SELECT, FROM, WHERE sub-parts. The ORDER BY and LIMIT is | |
54 | * added at a later stage | |
55 | */ | |
56 | ||
57 | /** | |
58 | * Count of records that match the current input parameters | |
59 | * Used by pager | |
60 | */ | |
00be9182 | 61 | public function count(); |
6a488035 TO |
62 | |
63 | /** | |
64 | * Summary information for the query that can be displayed in the template | |
65 | * This is useful to pass total / sub total information if needed | |
66 | */ | |
00be9182 | 67 | public function summary(); |
6a488035 TO |
68 | |
69 | /** | |
70 | * List of contact ids that match the current input parameters | |
71 | * Used by different tasks. Will be also used to optimize the | |
72 | * 'all' query below to avoid excessive LEFT JOIN blowup | |
73 | */ | |
00be9182 | 74 | public function contactIDs($offset = 0, $rowcount = 0, $sort = NULL); |
6a488035 TO |
75 | |
76 | /** | |
77 | * Retrieve all the values that match the current input parameters | |
78 | * Used by the selector | |
79 | */ | |
a130e045 | 80 | public function all( |
7d8c1168 | 81 | $offset = 0, $rowcount = 0, $sort = NULL, |
6a488035 TO |
82 | $includeContactIDs = FALSE |
83 | ); | |
84 | ||
85 | /** | |
86 | * The below two functions (from and where) are ONLY used if you want to | |
87 | * expose a custom group as a smart group and be able to send a mailing | |
88 | * to them via CiviMail. civicrm_email should be part of the from clause | |
89 | * The from clause should be a valid sql from clause including the word FROM | |
90 | * CiviMail will pick up the contacts where the email is primary and | |
91 | * is not on hold / opt out / do not email | |
6a488035 TO |
92 | */ |
93 | ||
94 | /** | |
fe482240 | 95 | * The from clause for the query. |
6a488035 | 96 | */ |
00be9182 | 97 | public function from(); |
6a488035 TO |
98 | |
99 | /** | |
fe482240 | 100 | * The where clause for the query. |
6a488035 | 101 | */ |
00be9182 | 102 | public function where($includeContactIDs = FALSE); |
6a488035 TO |
103 | |
104 | /** | |
fe482240 | 105 | * The template FileName to use to display the results. |
6a488035 | 106 | */ |
00be9182 | 107 | public function templateFile(); |
6a488035 TO |
108 | |
109 | /** | |
fe482240 | 110 | * Returns an array of column headers and field names and sort options. |
6a488035 | 111 | */ |
00be9182 | 112 | public function &columns(); |
96025800 | 113 | |
6a488035 | 114 | } |