You are here

function messaging_requirements in Messaging 6

Same name and namespace in other branches
  1. 5 messaging.install \messaging_requirements()
  2. 6.4 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()

1 call to messaging_requirements()
messaging_admin_settings in ./messaging.admin.inc
Admin settings form

File

./messaging.module, line 829

Code

function messaging_requirements($phase) {
  $requirements = array();

  // Ensure translations don't break at install time
  $t = get_t();
  if ($phase == 'runtime') {
    $methods = messaging_method_list();

    // Ensure that we have some sending methods available
    if (!$methods) {
      $requirements['messaging'] = array(
        'title' => $t('Messaging sending methods'),
        'value' => $t('No sending method plug-ins available. Please enable some Sending Method on the !admin-modules page.', array(
          '!admin-modules' => l($t('Modules administration'), 'admin/build/modules'),
        )),
        'severity' => REQUIREMENT_ERROR,
      );
    }
  }
  return $requirements;
}