You are here

function form_builder_examples_menu in Form Builder 7

Same name and namespace in other branches
  1. 6 examples/form_builder_examples.module \form_builder_examples_menu()
  2. 7.2 examples/form_builder_examples.module \form_builder_examples_menu()

Implementation of hook_menu().

File

examples/form_builder_examples.module, line 11
form_builder_examples.module Sample implementations of form_builder.

Code

function form_builder_examples_menu() {
  $items = array();
  $items['form-builder-example'] = array(
    'title' => 'Form builder example',
    'page callback' => 'form_builder_interface',
    'page arguments' => array(
      'example',
      'sample',
    ),
    'access arguments' => array(
      'access content',
    ),
    'type' => MENU_NORMAL_ITEM,
    'file' => 'form_builder.admin.inc',
    'file path' => drupal_get_path('module', 'form_builder') . '/includes',
  );
  $items['form-builder-example/edit'] = array(
    'title' => 'Edit',
    'page callback' => 'form_builder_interface',
    'page arguments' => array(
      'example',
      'sample',
    ),
    'access arguments' => array(
      'access content',
    ),
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  $items['form-builder-example/import'] = array(
    'title' => 'Import',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'form_builder_examples_import_form',
    ),
    // TODO: Make a form import.
    'access callback' => FALSE,
    'access arguments' => array(
      'access content',
    ),
    'type' => MENU_LOCAL_TASK,
  );
  $items['form-builder-example/export'] = array(
    'title' => 'Export',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'form_builder_examples_export_form',
    ),
    'access arguments' => array(
      'access content',
    ),
    'type' => MENU_LOCAL_TASK,
  );
  return $items;
}