You are here

function custompage_ui_settings_submit in Custom Page 7

Same name and namespace in other branches
  1. 6 custompage_ui/custompage_ui.module \custompage_ui_settings_submit()
1 string reference to 'custompage_ui_settings_submit'
custompage_ui_admin_settings_form in custompage_ui/custompage_ui.module

File

custompage_ui/custompage_ui.module, line 189
Custom Page Admin UI

Code

function custompage_ui_settings_submit($form, &$form_state) {
  $post = $form_state['values'];
  $obj = new stdClass();
  $obj->title = $post['title'];
  $obj->type = $post['type'];
  $obj->key = $post['key'];
  $obj->path = $post['path'];
  $obj->enabled = $post['enabled'];
  $settings = variable_get('CUSTOMPAGE_UI_CONFIG', array());
  $settings[$obj->key] = $obj;
  variable_set('CUSTOMPAGE_UI_CONFIG', $settings);
  drupal_flush_all_caches();
  drupal_goto('admin/structure/custompage');
}