You are here

function livechat_requirements in LiveChat 8

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

File

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

Code

function livechat_requirements($phase) {
  $requirements = [];
  if ($phase == 'runtime') {

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