The Modules List

Once an installation profile has been chosen, Drupal will step through a number of basic installation tasks, including language selection, system verification, and database configuration. Then it will begin installing the system.

Part of this task is module installation and configuration. It is the responsibility of the installation profile to specify what modules should be installed. We will accomplish this with philosopherbios_profile_modules() : /**

* List the modules that should be installed. */

function philosopherbios_profile_modules() { return array(

// Drupal modules enabled by default (but not required): 'color', 'comment', 'help', 'menu', 'taxonomy', 'dblog', // Other Drupal core modules we need: 'trigger', // Our modules:

'biography', 'emailusers', 'goodreads', 'philquotes', 'sitenews',

As with the previous function, this function simply returns an array. To be specific, it returns an array of module names. Every module in this array will be installed and activated.

Where are the required core modules?

All the required modules — action, node, system and so on—are automatically installed. They are installed at an earlier stage of the installation process. They should never be included in this list.

I have broken the list above into three sections. Most Drupal installations will want to install these basic modules:

// Drupal modules enabled by default (but not required) 'color', 'comment', 'help', 'menu', 'taxonomy', 'dblog',

These modules—all part of the Drupal distribution—provide features that are used widely, and they are also all enabled in the default profile.

Next, we added the Trigger module. While this module is not enabled by the default Drupal installer, our installer enables it. Why? Because one of our modules, sitenews, lists it as a dependency.

Finally, there is the list of our modules:

'biography', 'emailusers', 'goodreads', 'philquotes', 'sitenews',

Does order matter? When it comes to dependencies, it does. Modules are installed in the order they are listed. If Module A depends upon Module B, then make sure that Module B is installed first by putting it earlier in the list.

Once all the modules have been installed, the administrator will be prompted to do some configuring and create an account. All of this is handled by the installer, and is generally not changed by the installation profile.

After the configuration screen, control will be passed to our profile script again. This is where we will do the brunt of our work.

Was this article helpful?

0 0

Post a comment