You are here

function imageapi_optimize_menu in Image Optimize (or ImageAPI Optimize) 7.2

Same name and namespace in other branches
  1. 7 imageapi_optimize.module \imageapi_optimize_menu()

Implements hook_menu().

File

./imageapi_optimize.module, line 95

Code

function imageapi_optimize_menu() {
  $items['admin/config/media/imageapi-optimize'] = array(
    'title' => 'Imageapi optimize',
    'description' => 'Configure pipelines that can be used for optimizing images on display.',
    'page callback' => 'imageapi_optimize_pipeline_list',
    'access arguments' => array(
      'administer imageapi optimize',
    ),
    'file' => 'imageapi_optimize.admin.inc',
  );
  $items['admin/config/media/imageapi-optimize/list'] = array(
    'title' => 'List',
    'description' => 'List the current imageapi optimize pipelines on the site.',
    'page callback' => 'imageapi_optimize_pipeline_list',
    'access arguments' => array(
      'administer imageapi optimize',
    ),
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => 0,
    'file' => 'imageapi_optimize.admin.inc',
  );
  $items['admin/config/media/imageapi-optimize/usage'] = array(
    'title' => 'Usages',
    'description' => 'List the current imageapi optimize pipelines usages on the site.',
    'page callback' => 'imageapi_optimize_pipeline_usage_list',
    'access arguments' => array(
      'administer imageapi optimize',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 1,
    'file' => 'imageapi_optimize.admin.inc',
  );
  $items['admin/config/media/imageapi-optimize/add'] = array(
    'title' => 'Add pipeline',
    'description' => 'Add a new imageapi optmize pipeline.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'imageapi_optimize_pipeline_add_form',
    ),
    'access arguments' => array(
      'administer imageapi optimize',
    ),
    'type' => MENU_LOCAL_ACTION,
    'weight' => 2,
    'file' => 'imageapi_optimize.admin.inc',
  );
  $items['admin/config/media/imageapi-optimize/edit/%imageapi_optimize_pipeline'] = array(
    'title' => 'Edit pipeline',
    'description' => 'Configure an imageapi optimize pipeline.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'imageapi_optimize_pipeline_form',
      5,
    ),
    'access arguments' => array(
      'administer imageapi optimize',
    ),
    'file' => 'imageapi_optimize.admin.inc',
  );
  $items['admin/config/media/imageapi-optimize/delete/%imageapi_optimize_pipeline'] = array(
    'title' => 'Delete pipeline',
    'description' => 'Delete an imageapi optimize pipeline.',
    'load arguments' => array(
      NULL,
      (string) IMAGEAPI_OPTIMIZE_STORAGE_NORMAL,
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'imageapi_optimize_pipeline_delete_form',
      5,
    ),
    'access arguments' => array(
      'administer imageapi optimize',
    ),
    'file' => 'imageapi_optimize.admin.inc',
  );
  $items['admin/config/media/imageapi-optimize/revert/%imageapi_optimize_pipeline'] = array(
    'title' => 'Revert pipeline',
    'description' => 'Revert an imageapi optimize pipeline.',
    'load arguments' => array(
      NULL,
      (string) IMAGEAPI_OPTIMIZE_STORAGE_OVERRIDE,
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'imageapi_optimize_pipeline_revert_form',
      5,
    ),
    'access arguments' => array(
      'administer imageapi optimize',
    ),
    'file' => 'imageapi_optimize.admin.inc',
  );
  $items['admin/config/media/imageapi-optimize/edit/%imageapi_optimize_pipeline/processors/%imageapi_optimize_processor'] = array(
    'title' => 'Edit imageapi optimize processor',
    'description' => 'Edit an existing processor within a pipeline.',
    'load arguments' => array(
      5,
      (string) IMAGEAPI_OPTIMIZE_STORAGE_EDITABLE,
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'imageapi_optimize_processor_form',
      5,
      7,
    ),
    'access arguments' => array(
      'administer imageapi optimize',
    ),
    'file' => 'imageapi_optimize.admin.inc',
  );
  $items['admin/config/media/imageapi-optimize/edit/%imageapi_optimize_pipeline/processors/%imageapi_optimize_processor/delete'] = array(
    'title' => 'Delete imageapi optimize processor',
    'description' => 'Delete an existing processor from a pipeline.',
    'load arguments' => array(
      5,
      (string) IMAGEAPI_OPTIMIZE_STORAGE_EDITABLE,
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'imageapi_optimize_processor_delete_form',
      5,
      7,
    ),
    'access arguments' => array(
      'administer imageapi optimize',
    ),
    'file' => 'imageapi_optimize.admin.inc',
  );
  $items['admin/config/media/imageapi-optimize/edit/%imageapi_optimize_pipeline/add/%imageapi_optimize_processor_definition'] = array(
    'title' => 'Add imageapi optimize procesor',
    'description' => 'Add a new processor to a pipeline.',
    'load arguments' => array(
      5,
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'imageapi_optimize_processor_form',
      5,
      7,
    ),
    'access arguments' => array(
      'administer imageapi optimize',
    ),
    'file' => 'imageapi_optimize.admin.inc',
  );
  return $items;
}