You are here

function hubspot_install in HubSpot 8

Same name and namespace in other branches
  1. 6.2 hubspot.install \hubspot_install()
  2. 6 hubspot.install \hubspot_install()
  3. 7.3 hubspot.install \hubspot_install()
  4. 7 hubspot.install \hubspot_install()
  5. 7.2 hubspot.install \hubspot_install()
  6. 3.x 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')),
  ]));
}