You are here

function notifications_forum_requirements in Forum notifications 7

Implements hook_requirements().

File

./notifications_forum.module, line 384

Code

function notifications_forum_requirements($phase) {
  $requirements = array();
  if ($phase == 'runtime') {
    $enabled = _notifications_forum_enabled();
    $requirements['notifications_forum'] = array(
      'title' => t('Forum notifications'),
      'severity' => $enabled ? REQUIREMENT_OK : REQUIREMENT_ERROR,
      'value' => $enabled ? t('Enabled') : t('Disabled'),
    );
    if (!$enabled) {
      $requirements['notifications_forum']['description'] = t('The forum notifications module won\'t work if you don\'t <a href="!url">enable the "Forum" vocabulary</a> for tag subscriptions.', array(
        '!url' => url('admin/config/messaging/subscriptions/tags'),
      ));
    }
  }
  return $requirements;
}