| [ Index ] |
PHP Cross Reference of Drupal 6 (yi-drupal) |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * @file 5 * Module builder code generating code specific to Drupal 5. 6 */ 7 8 /** 9 * Generate module info file code. 10 * 11 * @param $module_data 12 * @param $module_data 13 * Same as for generate_module(). 14 * An associative array of data for the module. The keys can *mostly* be taken 15 * straight from form values. They are as follows: 16 * - 'module_root_name' 17 * - 'module_readable_name' 18 * - 'module_short_description' 19 * - 'module_help_text' 20 * - 'hooks': An associative array whose keys are full hook names 21 * (eg 'hook_menu'), where requested hooks have a value of TRUE. 22 * Unwanted hooks may also be included as keys provided their value is FALSE. 23 * - 'module_dependencies': a string of dependencies, eg 'forum views'. 24 * - 'module_package': the module package. 25 */ 26 function module_builder_generate_info($module_data) { 27 // The weird syntax stops this from getting mangled by CVS 28 $info = '; $' . 'Id$' . "\n"; 29 $info .= 'name = ' . $module_data['module_readable_name'] . "\n"; 30 $info .= 'description = '. $module_data['module_short_description'] ."\n"; 31 32 if (!empty($module_data['module_dependencies'])) { 33 $info .= 'dependencies = '. $module_data['module_dependencies'] ."\n"; 34 } 35 36 if (!empty($module_data['module_package'])) { 37 $info .= 'package = '. $module_data['module_package'] ."\n"; 38 } 39 40 return $info; 41 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Mon Jul 9 18:01:44 2012 | Cross-referenced by PHPXref 0.7 |