You are here

function entityconnect_return in Entity connect 7.2

Same name and namespace in other branches
  1. 7 includes/entityconnect.menu.inc \entityconnect_return()

Page callback: Redirects to the form page.

We redirect to the form page with the build_cache_id as a get param.

1 string reference to 'entityconnect_return'
entityconnect_menu in ./entityconnect.module
Implements hook_menu().

File

includes/entityconnect.menu.inc, line 12
Handles all entityconnect menu item page callbacks.

Code

function entityconnect_return($cache_id) {
  $cache = entityconnect_cache_get($cache_id);
  $css_id = $cache->data['form_state']['clicked_button']['#id'];
  $options = array(
    'query' => array(
      'build_cache_id' => $cache_id,
      'return' => TRUE,
    ),
    'fragment' => $css_id,
  );

  //Collect additional request parameters, skip 'q', since this is the destination
  foreach ($cache->data['params'] as $key => $value) {
    if ('build_cache_id' == $key) {
      continue;
    }
    $options['query'][$key] = $value;
  }
  drupal_goto($cache->data['dest'], $options);
}