v1/web/modules/contrib/commerce/commerce.install

32 lines
650 B
PHP

<?php
/**
* @file
* Contains install and update functions for Commerce.
*/
/**
* Implements hook_requirements().
*/
function commerce_requirements($phase) {
$requirements = [];
if ($phase == 'install' || $phase == 'runtime') {
if (!extension_loaded('bcmath')) {
$requirements['commerce_bcmath'] = [
'title' => t('BC Math'),
'description' => t('Commerce requires the BC Math PHP extension.'),
'severity' => REQUIREMENT_ERROR,
];
}
}
return $requirements;
}
/**
* Install the Token module.
*/
function commerce_update_8201() {
\Drupal::service('module_installer')->install(['token']);
}