You are here

function bibcite_requirements in Bibliography & Citation 8

Same name and namespace in other branches
  1. 2.0.x bibcite.install \bibcite_requirements()

Implements hook_requirements().

File

./bibcite.install, line 11
Module installation hooks implementation.

Code

function bibcite_requirements($phase) {
  $requirements = [];
  switch ($phase) {
    case 'runtime':
    case 'install':
      if (!class_exists('\\AcademicPuma\\CiteProc\\CiteProc') || !class_exists('\\ADCI\\FullNameParser\\Parser')) {
        $requirements['bibcite_dependencies'] = [
          'title' => t('Bibliography & Citation dependencies'),
          'description' => t("Bibliography & Citation requires the academicpuma/citeproc-php and adci/full-name-parser libraries. See the module's README.md file for more information."),
          'severity' => REQUIREMENT_ERROR,
        ];
      }
  }
  return $requirements;
}