You are here

price.install in Price 8

Contains install and update functions for Price.

File

price.install
View source
<?php

/**
 * @file
 * Contains install and update functions for Price.
 */

/**
 * Implements hook_requirements().
 */
function price_requirements($phase) {
  $requirements = [];
  if ($phase == 'install') {
    if (!class_exists('\\CommerceGuys\\Intl\\Currency\\CurrencyRepository')) {
      $requirements['price_library'] = [
        'description' => t("Price requires the commerceguys/intl library."),
        'severity' => REQUIREMENT_ERROR,
      ];
    }
  }
  return $requirements;
}

Functions

Namesort descending Description
price_requirements Implements hook_requirements().