checklistapi_example.module 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284
  1. <?php
  2. /**
  3. * @file
  4. * An example implementation of the Checklist API.
  5. */
  6. /**
  7. * Implements hook_checklistapi_checklist_info().
  8. *
  9. * Defines a checklist based on
  10. * @link http://buytaert.net/drupal-learning-curve Dries Buytaert's Drupal learning curve @endlink
  11. * .
  12. */
  13. function checklistapi_example_checklistapi_checklist_info() {
  14. $definitions = array();
  15. $definitions['example_checklist'] = array(
  16. '#title' => t('Checklist API example'),
  17. '#path' => 'admin/config/development/checklistapi-example',
  18. '#description' => t('An example implementation of the Checklist API.'),
  19. '#help' => t('<p>This checklist based on <a href="http://buytaert.net/drupal-learning-curve">Dries Buytaert\'s Drupal learning curve</a> is an example implementation of the <a href="http://drupal.org/project/checklistapi">Checklist API</a>.</p>'),
  20. 'i_suck' => array(
  21. '#title' => t('I suck'),
  22. '#description' => t('<p>Gain these skills to pass the <em><a href="http://headrush.typepad.com/creating_passionate_users/2005/10/getting_users_p.html">suck threshold</a></em> and start being creative with Drupal.</p>'),
  23. 'install_configure' => array(
  24. '#title' => t('Installation and configuration of Drupal core'),
  25. 'handbook_page' => array(
  26. '#text' => t('Installation Guide'),
  27. '#path' => 'http://drupal.org/documentation/install',
  28. ),
  29. ),
  30. 'node_system' => array(
  31. '#title' => t('Node system'),
  32. 'handbook_page' => array(
  33. '#text' => t('Manage nodes'),
  34. '#path' => 'http://drupal.org/node/306808',
  35. ),
  36. ),
  37. 'block_system' => array(
  38. '#title' => t('Block system'),
  39. 'handbook_page' => array(
  40. '#text' => t('Working with blocks (content in regions)'),
  41. '#path' => 'http://drupal.org/documentation/modules/block',
  42. ),
  43. ),
  44. 'users' => array(
  45. '#title' => t('Users, roles and permissions'),
  46. 'handbook_page' => array(
  47. '#text' => t('Managing users'),
  48. '#path' => 'http://drupal.org/node/627158',
  49. ),
  50. ),
  51. 'contrib' => array(
  52. '#title' => t('Installing contributed themes and modules'),
  53. 'handbook_page' => array(
  54. '#text' => t('Installing modules and themes'),
  55. '#path' => 'http://drupal.org/documentation/install/modules-themes',
  56. ),
  57. ),
  58. ),
  59. 'i_get_by' => array(
  60. '#title' => t('I get by'),
  61. '#description' => t('<p>Gain these skills to pass the <em><a href="http://headrush.typepad.com/creating_passionate_users/2005/10/getting_users_p.html">passion threshold</a></em> and start kicking butt with Drupal.</p>'),
  62. 'upgrade_patch_monitor' => array(
  63. '#title' => t('Upgrading, patching, (security) monitoring'),
  64. 'handbook_page_upgrading' => array(
  65. '#text' => t('Upgrading from previous versions'),
  66. '#path' => 'http://drupal.org/upgrade',
  67. ),
  68. 'handbook_page_patching' => array(
  69. '#text' => t('Applying patches'),
  70. '#path' => 'http://drupal.org/patch/apply',
  71. ),
  72. 'security_advisories' => array(
  73. '#text' => t('Security advisories'),
  74. '#path' => 'http://drupal.org/security',
  75. ),
  76. 'handbook_page_monitoring' => array(
  77. '#text' => t('Monitoring a site'),
  78. '#path' => 'http://drupal.org/node/627162',
  79. ),
  80. ),
  81. 'navigation_menus_taxonomy' => array(
  82. '#title' => t('Navigation, menus, taxonomy'),
  83. 'handbook_page_menus' => array(
  84. '#text' => t('Working with Menus'),
  85. '#path' => 'http://drupal.org/documentation/modules/menu',
  86. ),
  87. 'handbook_page_taxonomy' => array(
  88. '#text' => t('Organizing content with taxonomy'),
  89. '#path' => 'http://drupal.org/documentation/modules/taxonomy',
  90. ),
  91. ),
  92. 'locale_i18n' => array(
  93. '#title' => t('Locale and internationalization'),
  94. 'handbook_page' => array(
  95. '#text' => t('Multilingual Guide'),
  96. '#path' => 'http://drupal.org/documentation/multilingual',
  97. ),
  98. ),
  99. 'customize_front_page' => array(
  100. '#title' => t('Drastically customize front page'),
  101. 'handbook_page' => array(
  102. '#text' => t('Totally customize the LOOK of your front page'),
  103. '#path' => 'http://drupal.org/node/317461',
  104. ),
  105. ),
  106. 'theme_modification' => array(
  107. '#title' => t('Theme and template modifications'),
  108. 'handbook_page' => array(
  109. '#text' => t('Theming Guide'),
  110. '#path' => 'http://drupal.org/documentation/theme',
  111. ),
  112. ),
  113. ),
  114. 'i_kick_butt' => array(
  115. '#title' => t('I kick butt'),
  116. 'contribute_docs_support' => array(
  117. '#title' => t('Contributing documentation and support'),
  118. 'handbook_page_docs' => array(
  119. '#text' => t('Contribute to documentation'),
  120. '#path' => 'http://drupal.org/contribute/documentation',
  121. ),
  122. 'handbook_page_support' => array(
  123. '#text' => t('Provide online support'),
  124. '#path' => 'http://drupal.org/contribute/support',
  125. ),
  126. ),
  127. 'content_types_views' => array(
  128. '#title' => t('Content types and views'),
  129. 'handbook_page_content_types' => array(
  130. '#text' => t('Working with nodes, content types and fields'),
  131. '#path' => 'http://drupal.org/node/717120',
  132. ),
  133. 'handbook_page_views' => array(
  134. '#text' => t('Working with Views'),
  135. '#path' => 'http://drupal.org/documentation/modules/views',
  136. ),
  137. ),
  138. 'actions_workflows' => array(
  139. '#title' => t('Actions and workflows'),
  140. 'handbook_page' => array(
  141. '#text' => t('Actions and Workflows'),
  142. '#path' => 'http://drupal.org/node/924538',
  143. ),
  144. ),
  145. 'development' => array(
  146. '#title' => t('Theme and module development'),
  147. 'handbook_page_theming' => array(
  148. '#text' => t('Theming Guide'),
  149. '#path' => 'http://drupal.org/documentation/theme',
  150. ),
  151. 'handbook_page_development' => array(
  152. '#text' => t('Develop for Drupal'),
  153. '#path' => 'http://drupal.org/documentation/develop',
  154. ),
  155. ),
  156. 'advanced_tasks' => array(
  157. '#title' => t('jQuery, Form API, security audits, performance tuning'),
  158. 'handbook_page_jquery' => array(
  159. '#text' => t('JavaScript and jQuery'),
  160. '#path' => 'http://drupal.org/node/171213',
  161. ),
  162. 'handbook_page_form_api' => array(
  163. '#text' => t('Form API'),
  164. '#path' => 'http://drupal.org/node/37775',
  165. ),
  166. 'handbook_page_security' => array(
  167. '#text' => t('Securing your site'),
  168. '#path' => 'http://drupal.org/security/secure-configuration',
  169. ),
  170. 'handbook_page_performance' => array(
  171. '#text' => t('Managing site performance'),
  172. '#path' => 'http://drupal.org/node/627252',
  173. ),
  174. ),
  175. 'contribute_code' => array(
  176. '#title' => t('Contributing code, designs and patches back to Drupal'),
  177. 'handbook_page' => array(
  178. '#text' => t('Contribute to development'),
  179. '#path' => 'http://drupal.org/contribute/development',
  180. ),
  181. ),
  182. 'professional' => array(
  183. '#title' => t('Drupal consultant or working for a Drupal shop'),
  184. ),
  185. 'chx_or_unconed' => array(
  186. '#title' => t(
  187. "I'm a !chx or !UnConeD.",
  188. array(
  189. '!chx' => l(t('chx'), 'http://drupal.org/user/9446'),
  190. '!UnConeD' => l(t('UnConeD'), 'http://drupal.org/user/10'),
  191. )
  192. ),
  193. ),
  194. ),
  195. );
  196. return $definitions;
  197. }
  198. /**
  199. * Implements hook_checklistapi_checklist_info_alter().
  200. *
  201. * Alters the checklist from checklistapi_example_checklistapi_checklist_info()
  202. * according to
  203. * @link http://www.unleashedmind.com/files/drupal-learning-curve.png sun's modifications @endlink
  204. * of
  205. * @link http://buytaert.net/drupal-learning-curve Dries Buytaert's Drupal learning curve @endlink
  206. * .
  207. */
  208. function checklistapi_example_checklistapi_checklist_info_alter(&$definitions) {
  209. $definitions['example_checklist']['#help'] = t('<p>This checklist based on <a href="http://www.unleashedmind.com/files/drupal-learning-curve.png">sun\'s modification</a> of <a href="http://buytaert.net/drupal-learning-curve">Dries Buytaert\'s Drupal learning curve</a> is an example implementation of the <a href="http://drupal.org/project/checklistapi">Checklist API</a>.</p>');
  210. $definitions['example_checklist']['i_kick_butt']['advanced_tasks']['#title'] = t('jQuery, Form API, theme and module development');
  211. $definitions['example_checklist']['i_kick_butt']['advanced_tasks'] += $definitions['example_checklist']['i_kick_butt']['development'];
  212. unset($definitions['example_checklist']['i_kick_butt']['development']);
  213. $definitions['example_checklist']['i_kick_butt']['contribute_code']['#title'] = t('Contributing code, designs and patches back to Drupal contrib');
  214. unset($definitions['example_checklist']['i_kick_butt']['chx_or_unconed']);
  215. $definitions['example_checklist']['core_contributor'] = array(
  216. '#title' => t("I'm a core contributor"),
  217. 'contribute_core_code' => array(
  218. '#title' => t('Contribute code and patches to Drupal core'),
  219. 'handbook_page' => array(
  220. '#text' => t('Core contribution mentoring (core office hours)'),
  221. '#path' => 'http://drupal.org/core-office-hours',
  222. ),
  223. 'issue_queue' => array(
  224. '#text' => t('Core issue queue'),
  225. '#path' => 'http://drupal.org/project/issues/drupal',
  226. ),
  227. ),
  228. 'unit_tests' => array(
  229. '#title' => t('Write unit tests to get own patch committed.'),
  230. 'handbook_page' => array(
  231. '#text' => t('Unit Testing with Simpletest'),
  232. '#path' => 'http://drupal.org/node/811254',
  233. ),
  234. ),
  235. 'review_core_patches' => array(
  236. '#title' => t("Review other people's core patches, understanding coding standards."),
  237. 'pending_patches' => array(
  238. '#text' => t('Pending patches'),
  239. '#path' => 'http://drupal.org/project/issues/search/drupal?status[]=8&status[]=13&status[]=14',
  240. ),
  241. 'handbook_page' => array(
  242. '#text' => t('Coding standards'),
  243. '#path' => 'http://drupal.org/coding-standards',
  244. ),
  245. ),
  246. 'security_performance' => array(
  247. '#title' => t('Security audits, performance tuning.'),
  248. 'handbook_page_security' => $definitions['example_checklist']['i_kick_butt']['advanced_tasks']['handbook_page_security'],
  249. 'handbook_page_performance' => $definitions['example_checklist']['i_kick_butt']['advanced_tasks']['handbook_page_performance'],
  250. ),
  251. );
  252. unset($definitions['example_checklist']['i_kick_butt']['advanced_tasks']['handbook_page_security']);
  253. unset($definitions['example_checklist']['i_kick_butt']['advanced_tasks']['handbook_page_performance']);
  254. $definitions['example_checklist']['core_maintainer'] = array(
  255. '#title' => t("I'm trustworthy for core maintainership"),
  256. 'add_sub_system' => array(
  257. '#title' => t('Rewrite or add a Drupal core sub-system.'),
  258. ),
  259. 'sub_system_maintainer' => array(
  260. '#title' => t('Sub-system maintainer.'),
  261. ),
  262. 'core_branch_maintainer' => array(
  263. '#title' => t('Core branch maintainer'),
  264. ),
  265. );
  266. $definitions['example_checklist']['know_every_bit_of_core'] = array(
  267. '#title' => t('I know every bit of core'),
  268. 'im_chx' => array(
  269. '#title' => t(
  270. "I'm !chx.",
  271. array('!chx' => l(t('chx'), 'http://drupal.org/user/9446'))
  272. ),
  273. ),
  274. );
  275. $definitions['example_checklist']['understand_all_core_patch_implications'] = array(
  276. '#title' => t('I understand all implications of a core patch'),
  277. 'im_chuck_norris' => array(
  278. '#title' => t("I'm Chuck Norris."),
  279. ),
  280. );
  281. }