You are here

uc_country.install in Ubercart 8.4

Install, update, and uninstall functions for the uc_country module.

File

uc_country/uc_country.install
View source
<?php

/**
 * @file
 * Install, update, and uninstall functions for the uc_country module.
 */
use Drupal\uc_country\Entity\Country;

/**
 * Implements hook_install().
 */
function uc_country_install() {

  // Use the site default country to determine which country should
  // be enabled by default. All others will be available but disabled.
  $site_country = \Drupal::config('system.date')
    ->get('country.default');
  if ($site_country) {
    Country::load($site_country)
      ->enable()
      ->save();
  }
}

Functions

Namesort descending Description
uc_country_install Implements hook_install().