Commit | Line | Data |
---|---|---|
99e9587a DS |
1 | <?php |
2 | /* | |
3 | +--------------------------------------------------------------------+ | |
bc77d7c0 | 4 | | Copyright CiviCRM LLC. All rights reserved. | |
99e9587a | 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 | | |
99e9587a | 9 | +--------------------------------------------------------------------+ |
d25dd0ee | 10 | */ |
99e9587a DS |
11 | |
12 | /** | |
13 | * | |
14 | * @package CRM | |
ca5cec67 | 15 | * @copyright CiviCRM LLC https://civicrm.org/licensing |
99e9587a DS |
16 | */ |
17 | ||
18 | /** | |
efa3a566 | 19 | * Abstract class for search BAO query objects |
99e9587a | 20 | */ |
efa3a566 | 21 | abstract class CRM_Contact_BAO_Query_Interface { |
99e9587a | 22 | |
efa3a566 | 23 | abstract public function &getFields(); |
86538308 EM |
24 | |
25 | /** | |
100fef9d | 26 | * @param string $fieldName |
86538308 EM |
27 | * @param $mode |
28 | * @param $side | |
29 | * | |
30 | * @return mixed | |
31 | */ | |
efa3a566 | 32 | abstract public function from($fieldName, $mode, $side); |
99e9587a | 33 | |
86538308 EM |
34 | /** |
35 | * @param $query | |
36 | * | |
37 | * @return null | |
38 | */ | |
efa3a566 DS |
39 | public function select(&$query) { |
40 | return NULL; | |
41 | } | |
99e9587a | 42 | |
86538308 EM |
43 | /** |
44 | * @param $query | |
45 | * | |
46 | * @return null | |
47 | */ | |
efa3a566 DS |
48 | public function where(&$query) { |
49 | return NULL; | |
50 | } | |
99e9587a | 51 | |
86538308 EM |
52 | /** |
53 | * @param $tables | |
54 | * | |
55 | * @return null | |
56 | */ | |
efa3a566 DS |
57 | public function setTableDependency(&$tables) { |
58 | return NULL; | |
59 | } | |
60 | ||
86538308 EM |
61 | /** |
62 | * @param $panes | |
63 | * | |
64 | * @return null | |
65 | */ | |
efa3a566 DS |
66 | public function registerAdvancedSearchPane(&$panes) { |
67 | return NULL; | |
68 | } | |
69 | ||
86538308 | 70 | /** |
c490a46a | 71 | * @param CRM_Core_Form $form |
86538308 EM |
72 | * @param $type |
73 | * | |
74 | * @return null | |
75 | */ | |
efa3a566 DS |
76 | public function buildAdvancedSearchPaneForm(&$form, $type) { |
77 | return NULL; | |
78 | } | |
79 | ||
86538308 EM |
80 | /** |
81 | * @param $paneTemplatePathArray | |
82 | * @param $type | |
83 | * | |
84 | * @return null | |
85 | */ | |
efa3a566 DS |
86 | public function setAdvancedSearchPaneTemplatePath(&$paneTemplatePathArray, $type) { |
87 | return NULL; | |
88 | } | |
6a5f199e TO |
89 | |
90 | /** | |
91 | * Describe options for available for use in the search-builder. | |
92 | * | |
b7fa0173 TO |
93 | * The search builder determines its options by examining the API metadata corresponding to each |
94 | * search field. This approach assumes that each field has a unique-name (ie that the field's | |
95 | * unique-name in the API matches the unique-name in the search-builder). | |
96 | * | |
77c5b619 TO |
97 | * @param array $apiEntities |
98 | * List of entities whose options should be automatically scanned using API metadata. | |
99 | * @param array $fieldOptions | |
100 | * Keys are field unique-names; values describe how to lookup the options. | |
b7fa0173 TO |
101 | * For boolean options, use value "yesno". For pseudoconstants/FKs, use the name of an API entity |
102 | * from which the metadata of the field may be queried. (Yes - that is a mouthful.) | |
6a5f199e TO |
103 | * @void |
104 | */ | |
105 | public function alterSearchBuilderOptions(&$apiEntities, &$fieldOptions) { | |
106 | } | |
96025800 | 107 | |
86538308 | 108 | } |