You are here

function workbench_email_moderation_requirements in Workbench Email 8

Same name and namespace in other branches
  1. 2.x workbench_email.install \workbench_email_moderation_requirements()

Implements hook_requirements().

File

./workbench_email.install, line 11
Contains install routines for workbench_email.

Code

function workbench_email_moderation_requirements($phase) {
  $requirements = [];
  $module_handler = \Drupal::moduleHandler();
  if (!$module_handler
    ->moduleExists('workbench_moderation') && !$module_handler
    ->moduleExists('content_moderation')) {
    $requirements['missing_moderation'] = [
      'title' => t('A moderation module is not installed'),
      'description' => t('Workbench Email requires that either Workbench Moderation or Content Moderation is installed.'),
      'severity' => REQUIREMENT_ERROR,
    ];
  }
  return $requirements;
}