You are here

function commerce_invoice_requirements in Commerce Invoice 8.2

Implements hook_requirements().

File

./commerce_invoice.install, line 15
Contains install and update functions for Commerce Invoice.

Code

function commerce_invoice_requirements($phase) {
  $requirements = [];

  // Ensure the private file system path is configured.
  if (in_array($phase, [
    'install',
    'runtime',
  ]) && !PrivateStream::basePath()) {
    $requirements['commerce_invoice_private_path'] = [
      'title' => t('Private file system path'),
      'description' => t('Commerce Invoice requires the private file system path to be configured.'),
      'severity' => REQUIREMENT_ERROR,
    ];
  }
  return $requirements;
}