Book Image

Learning Drupal 6 Module Development

Book Image

Learning Drupal 6 Module Development

Overview of this book

Table of Contents (14 chapters)
Learning Drupal 6 Module Development
Credits
About the Author
About the Reviewers
Preface

The .profile Script


The Drupal installation system expects profiles to have certain features. These are implemented as functions that follow naming conventions like those of hooks. A function signature begins with the profile name.

For example, Drupal expects a function named<profilename>_profile_details() to exist, where<profilename> is replaced by the name of the profile. If this is not defined, the profile will not be available.

A .profile file should have the following functions:

  • <profilename>_profile_details(): Provides basic information about the profile. (This is required for the profile to function.)

  • <profilename>_profile_modules(): Lists the modules that should be installed with this profile.

  • <profilename>_profile_tasks(): Handles the installation tasks.

  • <profilename>_profile_task_list(): Provides a list of tasks that this profile will perform during an install.

While these four functions are used directly by the installer, a .profile file may...