You are here

function hubspot_install in HubSpot 3.x

Same name and namespace in other branches
  1. 8 hubspot.install \hubspot_install()
  2. 6.2 hubspot.install \hubspot_install()
  3. 6 hubspot.install \hubspot_install()
  4. 7.3 hubspot.install \hubspot_install()
  5. 7 hubspot.install \hubspot_install()
  6. 7.2 hubspot.install \hubspot_install()

Implements hook_install().

File

./hubspot.install, line 15
Installation file for hubspot.

Code

function hubspot_install() {
  $site_mail = \Drupal::config('system.site')
    ->get('mail');
  \Drupal::configFactory()
    ->getEditable('hubspot.settings')
    ->set('hubspot_debug_email', $site_mail)
    ->save();
  \Drupal::messenger()
    ->addStatus(t('The HubSpot module has been successfully installed. Configure it in the @link.', [
    '@link' => Link::fromTextAndUrl(t('HubSpot integration settings'), Url::fromRoute('hubspot.admin_settings')),
  ]));
}