You are here

function bueditor_menu in BUEditor 6.2

Same name and namespace in other branches
  1. 5 bueditor.module \bueditor_menu()
  2. 6 bueditor.module \bueditor_menu()
  3. 7 bueditor.module \bueditor_menu()

Implementation of hook_menu().

File

./bueditor.module, line 11
Implements the necessary hooks for the editor to work properly.

Code

function bueditor_menu() {
  $items = array();
  $path = 'admin/settings/bueditor';
  $common = array(
    'access arguments' => array(
      'administer bueditor(execute PHP)',
    ),
    'file' => 'admin/bueditor.admin.inc',
  );
  $form = array(
    'page callback' => 'drupal_get_form',
    'type' => MENU_CALLBACK,
  ) + $common;
  $items[$path] = $common + array(
    'title' => 'BUEditor',
    'description' => 'Customize your text editor.',
    'page callback' => 'bueditor_admin',
  );
  $items[$path . '/new'] = $form + array(
    'title' => 'Add new editor',
    'page arguments' => array(
      'bueditor_editor_form',
    ),
  );
  $items[$path . '/import'] = $form + array(
    'title' => 'Import editor',
    'page arguments' => array(
      'bueditor_editor_import_form',
    ),
  );
  $items[$path . '/%bueditor_editor'] = $form + array(
    'title' => 'Editor settings',
    'page arguments' => array(
      'bueditor_editor_form',
      3,
    ),
  );
  $items[$path . '/%bueditor_editor/delete'] = $form + array(
    'title' => 'Delete editor',
    'page arguments' => array(
      'bueditor_delete_form',
      3,
    ),
  );
  return $items;
}