You are here

function panels_goto in Panels 8.3

Same name and namespace in other branches
  1. 6.3 panels.module \panels_goto()
  2. 7.3 panels.module \panels_goto()

Perform a drupal_goto on a destination that may be an array like url().

Related topics

File

./panels.module, line 1459
panels.module

Code

function panels_goto($destination) {
  if (!is_array($destination)) {
    return drupal_goto($destination);
  }
  else {

    // Prevent notices by adding defaults
    $destination += array(
      'query' => NULL,
      'fragment' => NULL,
      'http_response_code' => NULL,
    );
    return drupal_goto($destination['path'], $destination['query'], $destination['fragment'], $destination['http_response_code']);
  }
}