function gelf_requirements in GELF 8
Same name and namespace in other branches
- 6 gelf.install \gelf_requirements()
 - 7 gelf.install \gelf_requirements()
 
Implements hook_requirements().
Indicate whether the gelf library requirement is met.
File
- ./
gelf.install, line 12  - Install functions for the gelf module.
 
Code
function gelf_requirements($phase) {
  $requirements = array();
  if ($phase == 'runtime') {
    if (!gelf_require()) {
      $requirements['gelf'] = array(
        'value' => t('Not installed'),
        'severity' => REQUIREMENT_ERROR,
        'description' => t('GELF module requires the GELF PHP library to be installed.  View the README in the GELF module directory for installation instructions.'),
      );
    }
    else {
      $requirements['gelf'] = array(
        'value' => t('Installed'),
        'severity' => REQUIREMENT_OK,
      );
    }
    $requirements['gelf']['title'] = t('GELF-PHP Library');
  }
  return $requirements;
}