You are here

function livechat_requirements in LiveChat 8.3

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

Implements hook_requirements().

File

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

Code

function livechat_requirements($phase) {
  $requirements = [];
  if ($phase == 'runtime' && !\Drupal::config('livechat.settings')
    ->get('licence_number', FALSE)) {
    $requirements['livechat'] = [
      'title' => t('LiveChat module'),
      'description' => t('LiveChat module has not been configured yet. Please configure its settings from the <a href=":url">LiveChat settings page</a>.', [
        ':url' => \Drupal::url('livechat.settings'),
      ]),
      'severity' => REQUIREMENT_ERROR,
      'value' => t('Not configured'),
    ];
  }
  return $requirements;
}