You are here

function s3fs_menu in S3 File System 7

Same name and namespace in other branches
  1. 7.3 s3fs.module \s3fs_menu()
  2. 7.2 s3fs.module \s3fs_menu()

Implements hook_menu().

File

./s3fs.module, line 59
Sets up the S3fsStreamWrapper class to be used as a Drupal file system.

Code

function s3fs_menu() {
  $items = array();
  $items['admin/config/media/s3fs'] = array(
    'title' => 'S3 File System',
    'description' => 'Configure S3 File System.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      's3fs_settings',
    ),
    'access arguments' => array(
      'administer s3fs',
    ),
    'file' => 's3fs.admin.inc',
    'type' => MENU_NORMAL_ITEM,
  );
  $items['admin/config/media/s3fs/settings'] = array(
    'title' => 'Settings',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => 0,
  );
  $items['admin/config/media/s3fs/actions'] = array(
    'title' => 'Actions',
    'description' => 'Actions for S3 File System.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      's3fs_actions',
    ),
    'access arguments' => array(
      'administer s3fs',
    ),
    'file' => 's3fs.admin.inc',
    'type' => MENU_LOCAL_TASK,
    'weight' => 10,
  );

  // A custom version of system/files/styles/%image_style, based on how the
  // core Image module creates image styles with image_style_deliver().
  $items['s3/files/styles/%image_style'] = array(
    'title' => 'Generate image style in S3',
    'page callback' => '_s3fs_image_style_deliver',
    'page arguments' => array(
      3,
    ),
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
  );
  return $items;
}