function auto_entitylabel_install in Automatic Entity Label 7
Implements hook_install().
File
- ./
auto_entitylabel.install, line 11 - Installation file for the automatic entity labels module.
Code
function auto_entitylabel_install() {
// Make sure hooks are invoked after cck main hooks.
db_update('system')
->fields(array(
'weight' => 5,
))
->condition('name', 'auto_entitylabel', '=')
->execute();
// Migrate settings (permission+variable) from the auto_nodetitle module.
_auto_entitylabel_ant_migrate();
// Notify the user they may want to install token.
if (!module_exists('token')) {
$t = get_t();
drupal_set_message($t('If you install the <a href="!url" target="blank">Token module</a>, Automatic Entity Label will be able to use token patterns.', array(
'!url' => 'http://drupal.org/project/token',
)));
}
drupal_set_message(t('Thank you for installing the <a href="@url_automatic_entity_label" target="blank">Automatic Entity Label</a>.', array(
'@url_automatic_entity_label' => 'https://www.drupal.org/project/auto_entitylabel',
)));
drupal_set_message(t('Watch the <a href="@url_daily_dose_of_drupal" target="blank">Daily Dose of Drupal</a> screencast by <a href="@url_shane_thomas" target="blank">Shane Thomas</a> for a short introduction and demonstration of the module and some of its features.', array(
'@url_daily_dose_of_drupal' => 'http://codekarate.com/daily-dose-of-drupal/drupal-7-automatic-entity-label-module',
'@url_shane_thomas' => 'https://www.drupal.org/user/506260',
)));
}