function ajax_test_dialog_contents

Menu callback: Returns the contents for dialogs opened by ajax_test_dialog().

1 string reference to 'ajax_test_dialog_contents'
ajax_test_menu in drupal/core/modules/system/tests/modules/ajax_test/ajax_test.module
Implements hook_menu().

File

drupal/core/modules/system/tests/modules/ajax_test/ajax_test.module, line 165
Helper module for Ajax framework tests.

Code

function ajax_test_dialog_contents() {

  // This is a regular render array; the keys do not have special meaning.
  return array(
    'content' => array(
      '#markup' => 'Example message',
    ),
    'cancel' => array(
      '#type' => 'link',
      '#title' => 'Cancel',
      '#href' => '',
      '#attributes' => array(
        // This is a special class to which JavaScript assigns dialog closing
        // behavior.
        'class' => array(
          'dialog-cancel',
        ),
      ),
    ),
  );
}