Templates Netbeans pour Drupal
(mise à jour 2010-05-12)
Ci-joint mes réglages, qui peuvent servir à d'autres, en attendant que le plug-in Drupal https://nbdrupalsupport.dev.java.net/ (re)voie le jour.
En quoi ça consiste :
- 3 modèles de fichiers minimalistes (drupal.module, drupal.info, drupal.install)
- Une série de raccourcis pour les "Code Templates" Netbeans (Tools>Options>Editor>Code Templates), reprenant les principaux "hooks" Drupal.
Installation
Depuis le menu Tools>Options, se trouve en bas à gauche les boutons Import et Export.
Procédez donc à un export de vos réglages avant d'importer ceux-là, dès fois que ça tourne mal !!!
Il y a juste à importer directement le .zip, et à redémarrer Netbeans
Utilisation
Une fois en place, ça ajoute simplement quelques entrées aux templates PHP déja présents, correspondant aux hooks Drupal :
Par exemple, taper hk_form_alter génère automatiquement
* Implementation of hook_form_alter()
*/
function hook_form_alter(&$form, &$form_state, $form_id) {
}
Attention, le nom de la fonction est précédé de hk (pour éviter les collisions avec les fonctions privées de certains modules) : hk_nodeapi pour hook_nodeapi, hk_user pour hook_user, etc...
Fonctions disponibles
- hook_file_download()
- hook_theme()
- hook_nodeapi()
- hook_schema_alter()
- hook_menu()
- hook_translated_menu_link_alter()
- hook_boot()
- hook_insert()
- hook_term_path()
- hook_form_alter()
- hook_search_preprocess()
- hook_link_alter()
- hook_node_operations()
- hook_comment()
- hook_forms()
- hook_help()
- hook_delete()
- hook_theme_registry_alter()
- hook_load()
- hook_translation_link_alter()
- hook_node_grants()
- hook_menu_link_alter()
- hook_exit()
- hook_validate()
- hook_access()
- hook_cron()
- hook_user()
- hook_link()
- hook_update_projects_alter()
- hook_action_info_alter()
- hook_user_operations()
- hook_view()
- hook_mail()
- hook_form()
- hook_hook_info()
- hook_filter_tips()
- hook_node_type()
- hook_locale()
- hook_watchdog()
- hook_update()
- hook_init()
- hook_system_info_alter()
- hook_menu_alter()
- hook_mail_alter()
- hook_profile_alter()
- hook_filter()
- hook_xmlrpc()
- hook_search()
- hook_ping()
- hook_node_access_records()
- hook_node_info()
- hook_db_rewrite_sql()
- hook_footer()
- hook_action_info()
- hook_update_index()
- hook_actions_delete()
- hook_block()
- hook_update_status_alter()
- hook_elements()
- hook_taxonomy()
Attention : testé sous Netbeans 6.8 uniquement (retour bienvenue).

Merci
Merci de cette contribution.