You are here

function module_info_form in Util 7

Form for module usage.

1 string reference to 'module_info_form'
module_info_menu in contribs/module_info/module_info.module
Implements hook_menu().

File

contribs/module_info/module_info.module, line 27
Display information about module use.

Code

function module_info_form($form, $form_state) {
  $form = array();
  $form['module_info_hook_name'] = array(
    '#type' => 'textfield',
    '#title' => t('Hook Name'),
    '#description' => t('Fill in the name of a hook (sans "hook") to find out who implements it.'),
    '#default_value' => isset($form_state['values']['module_info_hook_name']) ? $form_state['values']['module_info_hook_name'] : '',
  );
  if (isset($form_state['module_info_hook_list'])) {
    $form['list'] = array(
      '#type' => 'markup',
      '#markup' => $form_state['values']['module_info_hook_list'],
    );
  }
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Get information'),
  );
  return $form;
}