18.10.2016 Views

Drupal 7 Module Development

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Installation Profiles<br />

The profile will need to load this file during the install process to have access to the<br />

tasks and forms. To do this update store_install_tasks_alter()needs to append<br />

a call to include this file as shown here:<br />

/**<br />

* Implementation of hook_install_tasks_alter().<br />

*/<br />

function store_install_tasks_alter(&$tasks, &$install_state) {<br />

...<br />

// Include store.install.inc containing the tasks and forms.<br />

include_once 'store.install.inc';<br />

}<br />

This could be appended to hook_install_tasks() as well.<br />

Running the installer from the<br />

command line<br />

The installer can be run from both, a browser as a wizard as well as a part of an<br />

external installation script. For example, the installer may be used as a part of<br />

a system that automatically builds new sites. This is useful for cases where the<br />

installation will be automated. By default the installer runs in an interactive mode<br />

where it runs as an interactive wizard. The installer is capable of running in a<br />

non-interactive mode where settings are passed in as an array which will fill in the<br />

detail for each step. For example, see the following script which installs the site using<br />

the default profile:<br />

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!