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