You are here

function form_builder_requirements in Form Builder 7

Same name and namespace in other branches
  1. 6 form_builder.install \form_builder_requirements()
  2. 7.2 form_builder.install \form_builder_requirements()

Implementation of hook_requirements().

File

./form_builder.install, line 16

Code

function form_builder_requirements($phase) {
  $requirements = array();
  $t = get_t();
  if ($phase == 'runtime') {
    $form_builder_types = module_invoke_all('form_builder_form_types');
    if (empty($form_builder_types)) {
      $requirements['form_builder_types']['title'] = $t('Form builder');
      $requirements['form_builder_types']['severity'] = REQUIREMENT_ERROR;
      $requirements['form_builder_types']['value'] = $t('No dependent modules found.');
      $requirements['form_builder_types']['description'] = t('Form builder module is installed but no modules implement support for it. You may want to disable Form builder module until it is needed.');
    }
  }
  return $requirements;
}