Drupal

Drupal is a free, open-source content management system (CMS) with a large, supportive community. It's used by millions of people and organizations around the globe to build and maintain their websites. The world’s leading digital experience platform that helps you manage and deliver web content across channels and devices. Drupal enables organizations to build better sites and experiences faster

[Note]Note

Drupal plugin is only available in CodeLobster IDE Professional.

CodeLobster IDE integrates with Drupal 6, 7, 8, so you can use it from inside the IDE. Drupal support includes the following features:

Creating a Drupal project

If you have no application yet, you can generate a CodeLobster IDE project with Drupal - specific structure from a template. Drupal plugin has the wizard that helps you to get and install the latest official framework release.

In order to create a Drupal project:

  1. Choose File | New | Project... main menu item. Select Drupal framework item in the opened dialog.

    or

    Select the Project | Drupal | Create project main menu item.

  2. Define project location, name and project URL for debugging.

    [Note]Note

    If you enable Create project in a new folder option CodeLobster IDE creates a subfolder with the project name.

  3. Click the OK button.

  4. Select Drupal version and click Next button.

  5. Define database parameters:

    • Database name - the name of the MySQL database where your project data will be stored.

    • User name - used to connect with MySQL server.

    • User password - used to connect with MySQL server.

    • Root login - used to create a MySQL user.

    • Root password - used to create a MySQL user.

  6. Click the Next button.

  7. Specify some advanced database options:

    • Database host - specify a host name, if your database is located on a different server.

    • Database port - specify database port, if it runs on a non-standard port.

    • Table prefix - provide a unique prefix for each installation to store multiple Drupal installations in one database.

    • Use Smarty Engine

    • Select Minimal or Standard profile

  8. Click the Next button.

  9. Enter information for administrator account:

    • Administrator login

    • Administrator password

    • Administrator email

  10. Define Project URL to run install scrips.

  11. Click the Next button.

  12. Choose additional Drupal modules to install.

  13. Click the Next button.

  14. Select default Drupal theme.

  15. Click the Finish button to create Drupal project.

Creating a Drupal module

Drupal plugin offers you the wizard to create a new Drupal module with all necessary files.

In order to create a Drupal module:

  1. Select Project | Drupal | Create module main menu item

  2. Define project name.

  3. Click the Browse button to specify Drupal directory for user modules.

  4. Click the Next button.

  5. Enter the information about your module:

    • Display name - the displayed name of your module.

    • Description - a short module description.

    • Module version - the version of your module.

    • Core version - Drupal core version.

    • Dependencies - a space separated list of other modules that your module requires.

  6. Click the Finish button to create Drupal module.

Drupal IntelliSense

CodeLobster IDE provides IntelliSense for Drupal, which helps you write code more quickly and efficiently. IntelliSense saves you time by putting what you’re most likely to use at the top of your completion list. The suggestion list of the automatic completion appears as soon as you start typing. Pressing Tab or Enter will insert the selected item. You can trigger IntelliSense in the Editor window by pressing Ctrl + Space or using Edit | IntelliSense | Autocomplete main menu item.

The intelliSense suggestion box includes all standard Drupal's hooks and called automatically on placing ModuleName_

IntelliSense suggestion box list contains values for the parameters of the theme function.

Additionally, the IntelliSense suggestion list includes attributes and attributes values of the Drupal Form array.

Attributes autocomplete:

Attributes values autocomplete:

Drupal search for functions

CodeLobster IDE lets you search in the project for specific Drupal function by its name and by path.

To open find menu path by function name:

  1. Select Plugins | Drupal | Search menu function main menu item or press Ctrl + Shift + D.

    Menu functions dialog will appear. It contains all menu functions declared in your project and corresponding menu paths

  2. Find the necessary function name in the list and view the menu path corresponding to it. For search by the function name, enter its name to the textbox at the bottom of the window.

    For jumping to path declaration, double click function name in the list.

Drupal search - for menu path

CodeLobster IDE lets you search in the project for specific Drupal function by the path.

To open the Find menu path by function path:

  1. Select Plugins | Drupal | Search menu path main menu item or press Ctrl + Shift + R.

    Menu functions dialog will appear. It contains all menu functions declared in your project and corresponding menu paths

  2. Find the necessary function name in the list and view the menu path corresponding to it. For search by the function path, enter it to the textbox at the bottom of the window.

    For jumping to path declaration, double click function name in the list.

Drupal context and dynamic help

The Dynamic Help window allows opening help topics automatically for an element when the pointer is placed on. Drupal plugin uses the http://api.drupal.org for a quick search for relevant information.

To get help topics using Dynamic Help:

  • Place the pointer on the target element and press the F1 button.

  • Select Help | Context Help main menu item.

  • Click the topic item in the Dynamic Help window.

    [Tip]Tip

    To get Dynamic Help to appear, choose View | Panels | Dynamic Help main menu item.