No this isn't a Drupal module, but where would something like this live otherwise? :) It's a collection of templates used within NetBeans and makes coding must faster. There are quite a few templates and it can take some time to figure them out, but the author did a good job using some naming conventions. For example, "h_menu" will insert a full template for hook_menu resulting in:
function mymodule_menu(){
$items = array();
$items['path'] = array(
'title' => 'title',
'description' => 'description',
'page callback' => 'callback',
'page arguments' => array('callback_arg'),
'access arguments' => array('access_arg'),
'file' => 'includes/mymodule_type.inc',
);
return $items;
}
After the template is inserted, mymodule is automatically selected and ready to be edited to the actual name of your module.
Installation instructions (as of NB 6.9):
- Rename nb_templates.zip.txt to nb_templates.zip
- In NetBeans, goto Tools > Options > Editor > Code Templates and press the import button at the bottom.
- Browse and find nb_templates.zip, and select it.
- Select Editor > Code Templates
- Press OK
A must have for NetBeans users.
No comments:
Post a Comment