You are here

Using Code Generation

Once you have installed the Drupal Development module and restarted Netbeans, open up a PHP project file. You will notice on the editor Toolbar a new Drupal drop icon:

Clicking that icon will bring up the code insert tool:

Select the needed options from the drop down boxes on that dialog and the appropriate code will be inserted into your document at the cursor location. You can also check the box at the bottom to keep the dialog open if you plan on inserting a bunch of code at once.*

The dialog is associated with the opened file, so your options in the dialog won’t change until you switch to a new document or close and reopen that file. This provides extra convenience when working with different files and hooks across multiple files.


*NOTE: I had to remove the keep-open feature in 1.0.1 due to windows collecting on the desktop. I'm currently looking at ways to improve this dialog, including the possibility of a custom docking dialog.