You are here

function dialog_example_menu in Dialog 7

Same name and namespace in other branches
  1. 6 example/dialog_example.module \dialog_example_menu()

Implementation of hook_menu().

File

example/dialog_example.module, line 11
Provides a demonstration of using the Dialog API.

Code

function dialog_example_menu() {

  // Normal menu callback.
  $items['dialog/example'] = array(
    'title' => 'Dialog example',
    'description' => 'A demonstration of the Dialog module.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'dialog_example_page',
    ),
    'access arguments' => array(
      'access content',
    ),
  );

  // Dialog menu callback.
  $items['dialog/%dialog_js/example'] = array(
    'title' => 'Dialog example',
    'type' => MENU_CALLBACK,
    'page callback' => 'dialog_example_ajax_callback',
    'page arguments' => array(
      1,
    ),
    'access arguments' => array(
      'access content',
    ),
  );
  return $items;
}