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

Programming Profiles


In some respects, installation profiles are similar to modules. Architecturally, for example, the directory layouts are similar. Just as Drupal expects a module folder to contain a .module file, a profile folder is expected to have a .profile file.

But there are some differences as well. Profiles don't have .info files. Profiles don't need to be installed or activated (simply being in the right directory is enough). Profiles aren't integrated into the help system, either. These are small differences. But there is one big difference that a developer should be aware of.

The profile performs a substantial part of Drupal's installation. For coding, this has a practical consequence. An installation profile runs before some pieces of the Drupal infrastructure have been activated.

Hence, the hook framework that we are used to is not available. Instead, a series of callbacks similar to the hook system is used.

The Forms API works, but has to be used with care. In other APIs such...