livechat.install in LiveChat 8.3
Same filename and directory in other branches
Installation file for the LiveChat module.
File
livechat.installView source
<?php
/**
* @file
* Installation file for the LiveChat module.
*/
/**
* Implements hook_requirements().
*/
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;
}
/**
* Implements hook_uninstall().
*/
function livechat_uninstall() {
$config_factory = \Drupal::configFactory();
$config_factory
->getEditable('livechat.settings')
->delete();
}
Functions
Name![]() |
Description |
---|---|
livechat_requirements | Implements hook_requirements(). |
livechat_uninstall | Implements hook_uninstall(). |