function xfile_styles_menu in Styles 7
Implement hook_menu().
File
- contrib/
file_styles/ file_styles.module, line 274 - File widget formatter definitions.
Code
function xfile_styles_menu() {
$items = array();
// $items['file/generate/%file_style'] = array(
// 'title' => 'Generate file style',
// 'page callback' => 'file_style_generate',
// 'page arguments' => array(2),
// 'access callback' => TRUE,
// 'type' => MENU_CALLBACK,
// );
$items['admin/config/file/file-styles'] = array(
'title' => 'File styles',
'description' => 'Configure file styles that can be used for resizing or adjusting file on display.',
'page callback' => 'file_style_list',
'access arguments' => array(
'administer file styles',
),
'file' => 'file_styles.admin.inc',
);
$items['admin/config/file/file-styles/list'] = array(
'title' => 'List',
'description' => 'List the current file styles on the site.',
'page callback' => 'file_style_list',
'access arguments' => array(
'administer file styles',
),
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => 1,
'file' => 'file_styles.admin.inc',
);
$items['admin/config/file/file-styles/add'] = array(
'title' => 'Add style',
'description' => 'Add a new file style.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'file_style_add_form',
),
'access arguments' => array(
'administer file styles',
),
'type' => MENU_LOCAL_ACTION,
'weight' => 2,
'file' => 'file_styles.admin.inc',
);
$items['admin/config/file/file-styles/edit/%file_style'] = array(
'title' => 'Edit style',
'description' => 'Configure an file style.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'file_style_form',
5,
),
'access arguments' => array(
'administer file styles',
),
'type' => MENU_CALLBACK,
'file' => 'file_styles.admin.inc',
);
$items['admin/config/file/file-styles/delete/%file_style'] = array(
'title' => 'Delete style',
'description' => 'Delete an file style.',
'load arguments' => array(
NULL,
(string) FILE_STORAGE_NORMAL,
),
'page callback' => 'drupal_get_form',
'page arguments' => array(
'file_style_delete_form',
5,
),
'access arguments' => array(
'administer file styles',
),
'type' => MENU_CALLBACK,
'file' => 'file_styles.admin.inc',
);
$items['admin/config/file/file-styles/revert/%file_style'] = array(
'title' => 'Revert style',
'description' => 'Revert an file style.',
'load arguments' => array(
NULL,
(string) FILE_STORAGE_OVERRIDE,
),
'page callback' => 'drupal_get_form',
'page arguments' => array(
'file_style_revert_form',
5,
),
'access arguments' => array(
'administer file styles',
),
'type' => MENU_CALLBACK,
'file' => 'file_styles.admin.inc',
);
$items['admin/config/file/file-styles/edit/%file_style/effects/%file_effect'] = array(
'title' => 'Edit file effect',
'description' => 'Edit an exiting effect within a style.',
'load arguments' => array(
5,
(string) FILE_STORAGE_EDITABLE,
),
'page callback' => 'drupal_get_form',
'page arguments' => array(
'file_effect_form',
5,
7,
),
'access arguments' => array(
'administer file styles',
),
'type' => MENU_CALLBACK,
'file' => 'file_styles.admin.inc',
);
$items['admin/config/file/file-styles/edit/%file_style/effects/%file_effect/delete'] = array(
'title' => 'Delete file effect',
'description' => 'Delete an exiting effect from a style.',
'load arguments' => array(
5,
(string) FILE_STORAGE_EDITABLE,
),
'page callback' => 'drupal_get_form',
'page arguments' => array(
'file_effect_delete_form',
5,
7,
),
'access arguments' => array(
'administer file styles',
),
'type' => MENU_CALLBACK,
'file' => 'file_styles.admin.inc',
);
$items['admin/config/file/file-styles/edit/%file_style/add/%file_effect_definition'] = array(
'title' => 'Add file effect',
'description' => 'Add a new effect to a style.',
'load arguments' => array(
5,
),
'page callback' => 'drupal_get_form',
'page arguments' => array(
'file_effect_form',
5,
7,
),
'access arguments' => array(
'administer file styles',
),
'type' => MENU_CALLBACK,
'file' => 'file_styles.admin.inc',
);
return $items;
}