You are here

commerce_mollie.install in Commerce Mollie 8

Contains install and update functions for Commerce Mollie.

File

commerce_mollie.install
View source
<?php

/**
 * @file
 * Contains install and update functions for Commerce Mollie.
 */

/**
 * Implements hook_requirements().
 */
function commerce_mollie_requirements($phase) {
  $requirements = [];
  if ($phase === 'install') {
    if (!class_exists('\\Mollie\\Api\\MollieApiClient')) {
      $requirements['commerce_mollie_library'] = [
        'description' => t('Commerce Mollie requires the mollie/mollie-api-php library.'),
        'severity' => REQUIREMENT_ERROR,
      ];
    }
  }
  return $requirements;
}

Functions