You are here

function price_requirements in Price 8

Same name and namespace in other branches
  1. 3.x price.install \price_requirements()
  2. 2.0.x price.install \price_requirements()
  3. 2.x price.install \price_requirements()
  4. 3.0.x price.install \price_requirements()

Implements hook_requirements().

File

./price.install, line 11
Contains install and update functions for Price.

Code

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;
}