function smtp_install in SMTP Authentication Support 8
Same name and namespace in other branches
- 7.2 smtp.install \smtp_install()
- 7 smtp.install \smtp_install()
Implements hook_install().
File
- ./
smtp.install, line 56 - The installation instructions for the SMTP Authentication Support.
Code
function smtp_install() {
$messenger = \Drupal::messenger();
// @var \Drupal\Core\Routing\RouteBuilderInterface $routeBuilder $route_builder.
$route_builder = \Drupal::service('router.builder');
// Makes the 'smtp.config' route available here, see hook_install doc.
$route_builder
->rebuild();
$messenger
->addMessage(t('Thanks for installing SMTP Authentication Support'));
$messenger
->addMessage(t('Server settings on <a href="@url_settings">SMTP Authentication Support</a>', [
'@url_settings' => Url::fromRoute('smtp.config')
->toString(),
]));
}