You are here

uc_googleanalytics.install in Ubercart 8.4

Same filename and directory in other branches
  1. 7.3 uc_googleanalytics/uc_googleanalytics.install

Install, update and uninstall functions for the uc_googleanalytics module.

File

uc_googleanalytics/uc_googleanalytics.install
View 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

Namesort descending Description
uc_googleanalytics_install Implements hook_install().