function livechat_requirements in LiveChat 8.3
Same name and namespace in other branches
- 8 livechat.install \livechat_requirements()
- 8.2 livechat.install \livechat_requirements()
- 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;
}