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...