You are here

function editablefields_menu in Editable Fields 6.3

Same name and namespace in other branches
  1. 6 editablefields.module \editablefields_menu()
  2. 6.2 editablefields.module \editablefields_menu()

Implementation of hook_menu().

File

./editablefields.module, line 92
Editable fields module.

Code

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

  // Admin pages:
  $items['editablefields_view'] = array(
    'page callback' => 'editablefields_view',
    'access arguments' => array(
      'access content',
    ),
    'type' => MENU_CALLBACK,
    'title' => 'ajax view',
  );
  $items['editablefields_html'] = array(
    'page callback' => 'editablefields_html',
    'access arguments' => array(
      'access content',
    ),
    'type' => MENU_CALLBACK,
    'title' => 'ajax form',
  );
  $items['editablefields_submit'] = array(
    'page callback' => 'editablefields_submit',
    'access arguments' => array(
      'access content',
    ),
    'type' => MENU_CALLBACK,
    'title' => 'ajax submit',
  );
  $plugins = editablefields_get_responders();
  foreach ($plugins as $plugin_name => $plugin) {
    foreach ($plugin['hook_menu'] as $plugin_item_path => $plugin_item) {
      $items[$plugin_item_path] = $plugin_item + array(
        'title' => $plugin['title'],
        'file' => $plugin['file'],
        'file path' => $plugin['path'],
        'type' => MENU_CALLBACK,
      );
    }
  }
  return $items;
}