uc_googleanalytics.install in Ubercart 8.4
Same filename and directory in other branches
Install, update and uninstall functions for the uc_googleanalytics module.
File
uc_googleanalytics/uc_googleanalytics.installView source
<?php
/**
* @file
* Install, update and uninstall functions for the uc_googleanalytics module.
*/
/**
* Implements hook_install().
*/
function uc_googleanalytics_install() {
// Get the weight of the Google Analytics module.
$weight = \Drupal::configFactory()
->get('core.extension')
->get('module.google_analytics');
// Update the weight of the UC Google Analytics module so its hooks get called
// after the actual Google Analytics module.
\Drupal::configFactory()
->getEditable('core.extension')
->set('module.uc_googleanalytics', $weight + 1)
->save();
}
Functions
Name | Description |
---|---|
uc_googleanalytics_install | Implements hook_install(). |