Mercurial > hg > rr-repo
comparison sites/all/modules/ctools/tests/ctools_plugin_test.module @ 0:ff03f76ab3fe
initial version
author | danieleb <danielebarchiesi@me.com> |
---|---|
date | Wed, 21 Aug 2013 18:51:11 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:ff03f76ab3fe |
---|---|
1 <?php | |
2 /** | |
3 * Define some plugin systems to test ctools plugin includes. | |
4 */ | |
5 | |
6 /** | |
7 * Implementation of hook_ctools_plugin_dierctory() | |
8 */ | |
9 function ctools_plugin_test_ctools_plugin_directory($module, $plugin) { | |
10 if ($module == 'ctools_plugin_test') { | |
11 return 'plugins/' . $plugin; | |
12 } | |
13 } | |
14 | |
15 function ctools_plugin_test_ctools_plugin_type() { | |
16 return array( | |
17 'extra_defaults' => array( | |
18 'defaults' => array( | |
19 'bool' => true, | |
20 'string' => 'string', | |
21 'array' => array('some value'), | |
22 ), | |
23 ), | |
24 'cached' => array( | |
25 'cache' => TRUE, | |
26 'classes' => array( | |
27 'handler', | |
28 ), | |
29 ), | |
30 'not_cached' => array( | |
31 'cache' => FALSE, | |
32 'classes' => array( | |
33 'handler', | |
34 ), | |
35 ), | |
36 'big_hook_cached' => array( | |
37 'cache' => TRUE, | |
38 'use hooks' => TRUE, | |
39 'classes' => array( | |
40 'handler', | |
41 ), | |
42 ), | |
43 'big_hook_not_cached' => array( | |
44 'cache' => FALSE, | |
45 'use hooks' => TRUE, | |
46 'classes' => array( | |
47 'handler', | |
48 ), | |
49 ), | |
50 ); | |
51 } | |
52 | |
53 function ctools_plugin_test_ctools_plugin_test_big_hook_cached() { | |
54 return array( | |
55 'test1' => array( | |
56 'function' => 'ctools_plugin_test_hook_cached_test', | |
57 'handler' => 'class1', | |
58 ), | |
59 ); | |
60 } | |
61 | |
62 function ctools_plugin_test_ctools_plugin_test_big_hook_not_cached() { | |
63 return array( | |
64 'test1' => array( | |
65 'function' => 'ctools_plugin_test_hook_not_cached_test', | |
66 'class' => 'class1', | |
67 ), | |
68 ); | |
69 } | |
70 | |
71 function ctools_plugin_test_hook_cached_test() {} | |
72 function ctools_plugin_test_hook_not_cached_test() {} |