You are here

function flag_requirements in Flag 5

Same name and namespace in other branches
  1. 8.4 flag.install \flag_requirements()
  2. 6.2 flag.install \flag_requirements()
  3. 6 flag.install \flag_requirements()
  4. 7.3 flag.install \flag_requirements()
  5. 7.2 flag.install \flag_requirements()

Implementation of hook_requirements().

Prevent installing this module if the "Flag content" module is installed as well.

File

./flag.install, line 186
Flag module install/update hooks.

Code

function flag_requirements($phase) {
  $requirements = array();
  $t = get_t();
  if ($phase == 'install') {
    if (!defined('MAINTENANCE_MODE') && _flag_flag_content_installed()) {
      $requirements['flag_content_clash']['title'] = $t('Flag');
      $requirements['flag_content_clash']['severity'] = REQUIREMENT_ERROR;
      $requirements['flag_content_clash']['description'] = _flag_flag_content_message();
    }
  }
  return $requirements;
}