extlink.install in External Links 8
Same filename and directory in other branches
Install hook for the External Links module.
File
extlink.installView source
<?php
/**
* @file
* Install hook for the External Links module.
*/
/**
* Implements hook_install().
*/
function extlink_install() {
// Weight needs to be 1 for compatibility with SpamSpan.
module_set_weight('extlink', 1);
}
/**
* Add extlink and mailto icon labels to the default configuration.
*/
function extlink_update_8101() {
$config_factory = \Drupal::configFactory();
$config = $config_factory
->getEditable('extlink.settings');
$config
->set('extlink_label', '(link is external)');
$config
->set('extlink_mailto_label', '(link sends email)');
$config
->save(TRUE);
}
/**
* Add extlink_exclude_admin_routes to the default configuration.
*/
function extlink_update_8102() {
\Drupal::configFactory()
->getEditable('extlink.settings')
->set('extlink_exclude_admin_routes', FALSE)
->save();
}
Functions
Name | Description |
---|---|
extlink_install | Implements hook_install(). |
extlink_update_8101 | Add extlink and mailto icon labels to the default configuration. |
extlink_update_8102 | Add extlink_exclude_admin_routes to the default configuration. |