function mediafront_preset_menu in MediaFront 7
Same name and namespace in other branches
- 6.2 includes/mediafront.preset.inc \mediafront_preset_menu()
- 6 includes/mediafront.preset.inc \mediafront_preset_menu()
- 7.2 includes/mediafront.preset.inc \mediafront_preset_menu()
Implement the menu system for the preset.
1 call to mediafront_preset_menu()
- mediafront_menu in ./
mediafront.module - Implements hook_menu().
File
- includes/
mediafront.preset.inc, line 30
Code
function mediafront_preset_menu() {
$items = array();
// Get the presets path.
$presets_path = mediafront_get_presets_path();
$items[$presets_path] = array(
'title' => 'MediaFront Presets',
'description' => 'Manage and configure the presets for MediaFront.',
'page callback' => 'mediafront_presets_overview',
'access arguments' => array(
'administer mediafront presets',
),
);
$items[$presets_path . '/list'] = array(
'title' => 'List',
'access arguments' => array(
'administer mediafront presets',
),
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10,
);
$items[$presets_path . '/add'] = array(
'title' => 'Add preset',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'mediafront_preset_create_form',
),
'access arguments' => array(
'administer mediafront presets',
),
'type' => MENU_LOCAL_TASK,
);
$items[$presets_path . '/import'] = array(
'title' => t('Import preset'),
'page callback' => 'drupal_get_form',
'page arguments' => array(
'mediafront_preset_import_form',
),
'access arguments' => array(
'administer mediafront presets',
),
'type' => MENU_LOCAL_TASK,
);
$file = 'includes/mediafront.preset.inc';
$items[$presets_path . '/preset/%mediafront_preset'] = array(
'title' => 'Edit MediaFront Preset',
'title callback' => 'mediafront_preset_page_title',
'title arguments' => array(
4,
),
'file' => $file,
'page callback' => 'drupal_get_form',
'page arguments' => array(
'mediafront_preset_form',
4,
),
'access arguments' => array(
'administer mediafront presets',
),
);
$items[$presets_path . '/preset/%mediafront_preset/edit'] = array(
'title' => 'Edit',
'file' => $file,
'page arguments' => array(
4,
),
'access arguments' => array(
'administer mediafront presets',
),
'type' => MENU_DEFAULT_LOCAL_TASK,
);
$items[$presets_path . '/preset/%mediafront_preset/delete'] = array(
'title' => 'Delete',
'file' => $file,
'page arguments' => array(
'mediafront_preset_delete_confirm',
4,
),
'access arguments' => array(
'administer mediafront presets',
),
'type' => MENU_CALLBACK,
);
$items[$presets_path . '/preset/%mediafront_preset/export'] = array(
'title' => t('Export'),
'file' => $file,
'title callback' => 'mediafront_preset_page_title',
'title arguments' => array(
4,
),
'page callback' => 'drupal_get_form',
'page arguments' => array(
'mediafront_preset_export_form',
4,
),
'access arguments' => array(
'administer mediafront presets',
),
'type' => MENU_CALLBACK,
);
return $items;
}