You are here

function livechat_requirements in LiveChat 7

Same name and namespace in other branches
  1. 8.3 livechat.install \livechat_requirements()
  2. 8 livechat.install \livechat_requirements()
  3. 8.2 livechat.install \livechat_requirements()

Implements hook_requirements().

File

./livechat.install, line 11
Installation file for the LiveChat module.

Code

function livechat_requirements($phase) {
  $requirements = array();
  $t = get_t();
  if ($phase == 'runtime') {

    // Raise warning if a LiveChat license has not been installed yet.
    if (!livechat_is_installed()) {
      $requirements['livechat'] = array(
        'title' => $t('LiveChat'),
        'description' => $t('A LiveChat license has not been installed. Please go to <a href="@url">LiveChat settings</a>.', array(
          '@url' => url('admin/config/services/livechat/install'),
        )),
        'severity' => REQUIREMENT_ERROR,
        'value' => $t('Not configured'),
      );
    }
  }
  return $requirements;
}