You are here

function module_builder_build_new_submit in Module Builder 6

File

./module_builder.pages.inc, line 45

Code

function module_builder_build_new_submit($form, &$form_state) {
  $save = (object) array(
    'name' => $form_state['values']['title'],
  );
  drupal_write_record('module_builder_basic', $save);
  $prepared_form_values = array(
    'values' => array(
      'mid' => $save->mid,
      'type' => 'edit',
      'name' => $save->name,
    ),
  );
  module_builder_default_submit(array(), $prepared_form_values);
  $form_state['redirect'] = 'admin/build/module_builder/edit/' . $save->mid;
}