zopim.install in Zopim Live Chat 8
Same filename and directory in other branches
Install, update and uninstall functions for the Zopim Chat module.
File
zopim.installView source
<?php
/**
* @file
* Install, update and uninstall functions for the Zopim Chat module.
*/
/**
* Implementation of hook_requirements().
*/
function zopim_requirements($phase) {
$requirements = [];
if ($phase == 'runtime') {
// Raise warning if Zopim Chat user account has not been set yet.
if (\Drupal::config('zopim.settings')
->get('account_number', FALSE) == FALSE) {
$requirements['zopim'] = [
'title' => t('Zopim Chat module'),
'description' => t('Zopim Chat module has not been configured yet. Please configure its settings from the <a href=":url">Zopim Chat settings page</a>.', [
':url' => \Drupal::url('zopim.settings'),
]),
'severity' => REQUIREMENT_ERROR,
'value' => t('Not configured'),
];
}
}
return $requirements;
}
Functions
Name | Description |
---|---|
zopim_requirements | Implementation of hook_requirements(). |