Last updated February 21, 2013. Created by Orgun109uk on February 21, 2013.
Log in to edit this page.
In order to use a generated script file, you still need a module to provide it, this will usually be in either an existing module you have built for the site, or an empty module specific for the scripts. In this module you just need a single hook to tell restore where to look:
<?php
/**
* Implements hook_restore_scripts_location().
*/
function MY_MODULE_restore_scripts_location() {
// This can be any location required, but in this example we are using [MY MODULE]/restore-scripts.
return drupal_get_path('module', 'MY_MODULE') . '/restore-scripts';
}
?>Once the module has been setup, all you need to do is place any or all of your restore scripts into the defined scripts folder (in the example its [MY MODULE]/restore-scripts) and restore will find them. An example module is provided showing this usage, "restore_example_script" in the module/examples folder.