You are here

function messaging_requirements in Messaging 5

Same name and namespace in other branches
  1. 6.4 messaging.module \messaging_requirements()
  2. 6 messaging.module \messaging_requirements()
  3. 6.2 messaging.module \messaging_requirements()
  4. 6.3 messaging.install \messaging_requirements()
  5. 7 messaging.module \messaging_requirements()

Implementation of hook_requirements().

File

./messaging.install, line 97

Code

function messaging_requirements($phase) {
  if ($phase == 'runtime') {
    $list = messaging_method_list();
    if (empty($list)) {
      $t = get_t();
      return array(
        'messaging' => array(
          'title' => $t('Messaging method'),
          'value' => $t('At least one delivery module needs to be enabled for the messaging module to function.'),
          'severity' => REQUIREMENT_WARNING,
        ),
      );
    }
  }
}