You are here

function ajax_test_error in Drupal 7

Menu callback; Returns Ajax element with #error property set.

1 string reference to 'ajax_test_error'
ajax_test_menu in modules/simpletest/tests/ajax_test.module
Implements hook_menu().

File

modules/simpletest/tests/ajax_test.module, line 57
Helper module for Ajax framework tests.

Code

function ajax_test_error() {
  $message = '';
  if (!empty($_GET['message'])) {
    $message = $_GET['message'];
  }
  return array(
    '#type' => 'ajax',
    '#error' => $message,
  );
}