function picture_menu in Picture 7
Same name and namespace in other branches
- 7.2 picture.module \picture_menu()
Implements hook_menu().
File
- ./
picture.module, line 37 - Picture formatter.
Code
function picture_menu() {
$items = array();
$items['admin/config/media/picture'] = array(
'title' => 'Picture',
'description' => 'Manage Pictures',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'picture_admin_breakpoints',
),
'access arguments' => array(
'administer pictures',
),
'file' => 'picture.admin.inc',
);
$items['admin/config/media/picture/groups'] = array(
'title' => 'Groups',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => 10,
);
$items['admin/config/media/picture/settings'] = array(
'title' => 'Settings',
'type' => MENU_LOCAL_TASK,
'weight' => 20,
'description' => 'Pictures settings',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'picture_admin_settings',
),
'access arguments' => array(
'administer pictures',
),
'file' => 'picture.admin.inc',
);
$items['admin/config/media/picture/groups/global'] = array(
'title' => 'Map breakpoints and image styles',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -1,
);
$items['admin/config/media/picture/groups/import'] = array(
'title' => 'Import mappings',
'page arguments' => array(
'picture_admin_import_form',
),
'type' => MENU_LOCAL_TASK,
'access arguments' => array(
'administer pictures',
),
'file' => 'picture.admin.inc',
'weight' => 999,
);
$breakpoint_groups = breakpoints_breakpoint_group_load_all();
foreach ($breakpoint_groups as $breakpoint_group_name => $breakpoint_group) {
if (!empty($breakpoint_group->machine_name)) {
$items['admin/config/media/picture/groups/' . $breakpoint_group->machine_name] = array(
'title' => $breakpoint_group->name,
'page arguments' => array(
'picture_admin_breakpoints',
$breakpoint_group->machine_name,
),
'type' => MENU_LOCAL_TASK,
'access arguments' => array(
'administer pictures',
),
'file' => 'picture.admin.inc',
'weight' => 15,
);
$items['admin/config/media/picture/groups/' . $breakpoint_group->machine_name . '/export'] = array(
'title' => 'Export ' . check_plain($breakpoint_group->name) . ' mappings',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'picture_admin_export_form',
$breakpoint_group->machine_name,
),
'type' => MENU_LOCAL_ACTION,
'access arguments' => array(
'administer pictures',
$breakpoint_group->machine_name,
),
'access callback' => 'picture_mappings_export_access',
'file' => 'picture.admin.inc',
'weight' => 15,
);
}
}
$items['admin/config/media/picture/ckeditor'] = array(
'title' => 'CKEditor',
'type' => MENU_LOCAL_TASK,
'description' => 'Choose picture groups to present in the CKEditor image dialog',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'picture_ckeditor_settings',
),
'access arguments' => array(
'administer pictures',
),
'file' => 'picture.admin.inc',
'weight' => 0,
);
return $items;
}