You are here

function modalframe_example_menu in Modal Frame API 7

Same name and namespace in other branches
  1. 6 modules/modalframe_example/modalframe_example.module \modalframe_example_menu()

Implementation of hook_menu().

File

modules/modalframe_example/modalframe_example.module, line 24
Example for the Modal Frame module.

Code

function modalframe_example_menu() {
  $items = array();

  // This is the parent window, from where all examples are available.
  $items['modalframe-example'] = array(
    'title' => 'Modal Frame Examples',
    'page callback' => 'modalframe_example_page',
    'access arguments' => array(
      'access modalframe examples',
    ),
    'type' => MENU_NORMAL_ITEM,
  );

  // Hello world example.
  $items['modalframe-example/hello-world'] = array(
    'title' => 'Modal Frame Example (hello world)',
    'page callback' => 'modalframe_example_hello_world',
    'access arguments' => array(
      'access modalframe examples',
    ),
    'type' => MENU_CALLBACK,
  );

  // Simple form examples.
  $items['modalframe-example/simple-form'] = array(
    'title' => 'Modal Frame Example (simple form)',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'modalframe_example_simple_form',
    ),
    'access arguments' => array(
      'access modalframe examples',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['modalframe-example/simple-page'] = array(
    'title' => 'Modal Frame Example (simple page)',
    'page callback' => 'modalframe_example_simple_page',
    'access arguments' => array(
      'access modalframe examples',
    ),
    'type' => MENU_CALLBACK,
  );

  // Node edit form example.
  $items['modalframe-example/node-edit'] = array(
    'title' => 'Modal Frame Example (node edit)',
    'page callback' => 'modalframe_example_node_edit_page',
    'access arguments' => array(
      'access modalframe examples',
    ),
    'type' => MENU_CALLBACK,
  );
  return $items;
}