You are here

function entity_embed_ctools_export_ui_form_submit in Entity Embed 7.2

Same name and namespace in other branches
  1. 7.3 plugins/export_ui/entity_embed_ctools_export_ui_form.inc \entity_embed_ctools_export_ui_form_submit()
  2. 7 plugins/export_ui/entity_embed_ctools_export_ui_form.inc \entity_embed_ctools_export_ui_form_submit()

Submit function for entity_embed_ctools_export_ui_form().

1 string reference to 'entity_embed_ctools_export_ui_form_submit'
entity_embed_ctools_export_ui_form.inc in plugins/export_ui/entity_embed_ctools_export_ui_form.inc
Builds the ctools export UI page for configuring embed buttons.

File

plugins/export_ui/entity_embed_ctools_export_ui_form.inc, line 152
Builds the ctools export UI page for configuring embed buttons.

Code

function entity_embed_ctools_export_ui_form_submit($form, &$form_state) {

  // Filter out any unselected checkboxes.
  if (isset($form_state['values']['entity_type_bundles'])) {
    $form_state['values']['entity_type_bundles'] = array_filter($form_state['values']['entity_type_bundles']);
  }

  // Now handle the case of the next, previous, and submit buttons.
  // only submit will result in actual submission, all others rebuild.
  switch ($form_state['triggering_element']['#value']) {
    case t('Save'):

      // Submit: We're done.
      return;
  }

  // 'Choose' or anything else will cause rebuild of the form and present
  // it again.
  $form_state['rebuild'] = TRUE;
}