You are here

function module_builder_page in Module Builder 7

Same name and namespace in other branches
  1. 5 module_builder.module \module_builder_page()
  2. 6.2 includes/module_builder.pages.inc \module_builder_page()
  3. 7.2 includes/module_builder.pages.inc \module_builder_page()
1 string reference to 'module_builder_page'
module_builder_menu in ./module_builder.module
Implementation of hook_menu().

File

includes/module_builder.pages.inc, line 34
Menu callback for main module builder page.

Code

function module_builder_page($form_state) {
  $step = 'input';
  if (isset($form_state['clicked_button'])) {
    $step = $form_state['clicked_button']['#name'];
  }

  #dsm($step);
  switch ($step) {
    case 'input':

      // sanity check first time around
      _module_builder_check_settings();

    // fall through
    case 'back':
      $form = module_builder_page_input($form_state);
      break;
    case 'generate':
      $form = module_builder_page_generate($form_state);
      break;
    case 'download':
      $form = module_builder_page_download($form_state);
      break;
  }
  return $form;
}