You are here

function button_field_callback in Button Field 6

Page callback for simple_webservices/soap

@global stdClass $user

Return value

string

1 string reference to 'button_field_callback'
button_field_menu in ./button_field.module
Implementation of hook_menu().

File

./button_field.module, line 31
Defines a field, widget and formatter for the button field type.

Code

function button_field_callback() {
  global $user;
  $id = $_REQUEST['id'];
  list($field_name, $nid) = explode('-', $id);
  rules_invoke_event('button_field_clicked', node_load($nid), $user);

  // check to see if we have a page to redirect to
  $return_array = array();
  if (isset($_REQUEST['destination']) && !empty($_REQUEST['destination'])) {
    $return_array['redirect'] = urldecode($_REQUEST['destination']);
  }

  // end if we have a page to redirect to
  echo json_encode($return_array);
  exit;
}