function site_deploy_install in Hook Update Deploy Tools 7
Same name and namespace in other branches
- 8 boilerplate/install.php \site_deploy_install()
Implements hook_install().
File
- boilerplate/
install.php, line 10 - This file is used for all the hook_update_n() that will deploy the site.
Code
function site_deploy_install() {
// Provide friendly message to get started with permissions and configuration.
$t = get_t();
drupal_set_message($t('The site_deploy module has been successfully installed. It has no configuration, just use its site_deploy.install to manage the site\'s deployments.', array()));
$messages = array();
$messages[] = $t("Running existing hook_update_N's for site_deploy.");
// This is for initially standing up the production site which may come long
// after the development site has been up and running. Upon install it will
// run through all the currently existing hook_update_N.
// See http://dcycleproject.org/node/43
for ($i = 7000; $i < 8000; $i++) {
$existing_update_n = 'site_deploy_update_' . $i;
$sandbox = array();
if (function_exists($existing_update_n)) {
$messages[$existing_update_n] = $existing_update_n($sandbox);
$highest_run = $i;
}
}
HookUpdateDeployTools\Message::make('Site_deploy_update_N from 7000 to !max have been run.', array(
'!max' => $highest_run,
), WATCHDOG_INFO);
HookUpdateDeployTools\Message::varDumpToDrush($messages);
}