-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathquery_registry.api.php
54 lines (51 loc) · 1.71 KB
/
query_registry.api.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
/**
* @file
* Hook and callback implementations.
*/
/**
* Defines a set of queries that can be overridden.
*
* @return array
* An associative array of associative arrays which define queries. Each
* query should consist of a unique name mapped to an array of properties:
* - name: A human readable name for the query.
* - description: A description of the query.
*/
function hook_query_registry_register_queries() {
return array(
'my_query' => array(
'name' => t('My Query'),
'description' => t('It is awesome!'),
),
);
}
/**
* Defines a set of query implementations.
*
* @return array
* An associative array of associative arrays which define query
* implementations. Query implementations are expected to return a non-NULL
* value. Each query implementation's key should be that of a query and each
* definition should consist a mapping to an array of properties:
* - name: A human readable name for the implementation.
* - description: A description of the implementation.
* - module: The module containing the implementation.
* - extension(optional): The ext of the file containing the implementation.
* - filename(optional): The name of the file containing the implementation.
* - callable: A PHP callable for the implementation.
* - configure_path: Path to configure the implementation at.
*/
function hook_query_registry_register_implementations() {
return array(
'my_query' => array(
'name' => t('My Query Implementation'),
'description' => t('It is super awesome!'),
'module' => 'foo',
'filename' => 'bar',
'extension' => 'bom',
'callable' => 'foo_baz',
'configure_path' => 'admin/foo',
),
);
}