ctools_plugin_test.module
1.53 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?php
/**
* Define some plugin systems to test ctools plugin includes.
*/
/**
* Implementation of hook_ctools_plugin_dierctory()
*/
function ctools_plugin_test_ctools_plugin_directory($module, $plugin) {
if ($module == 'ctools_plugin_test') {
return 'plugins/' . $plugin;
}
}
function ctools_plugin_test_ctools_plugin_type() {
return array(
'extra_defaults' => array(
'defaults' => array(
'bool' => true,
'string' => 'string',
'array' => array('some value'),
),
),
'cached' => array(
'cache' => TRUE,
'classes' => array(
'handler',
),
),
'not_cached' => array(
'cache' => FALSE,
'classes' => array(
'handler',
),
),
'big_hook_cached' => array(
'cache' => TRUE,
'use hooks' => TRUE,
'classes' => array(
'handler',
),
),
'big_hook_not_cached' => array(
'cache' => FALSE,
'use hooks' => TRUE,
'classes' => array(
'handler',
),
),
);
}
function ctools_plugin_test_ctools_plugin_test_big_hook_cached() {
return array(
'test1' => array(
'function' => 'ctools_plugin_test_hook_cached_test',
'handler' => 'class1',
),
);
}
function ctools_plugin_test_ctools_plugin_test_big_hook_not_cached() {
return array(
'test1' => array(
'function' => 'ctools_plugin_test_hook_not_cached_test',
'class' => 'class1',
),
);
}
function ctools_plugin_test_hook_cached_test() {}
function ctools_plugin_test_hook_not_cached_test() {}