You are here

function farm_plan_consideration_menu in farmOS 7

Implements hook_menu().

File

modules/farm/farm_plan/farm_plan_consideration/farm_plan_consideration.module, line 11
Farm plan consideration module.

Code

function farm_plan_consideration_menu() {

  // List planning considerations.
  $items['farm/plan/%farm_plan/considerations'] = array(
    'title' => 'Considerations',
    'description' => 'Identify considerations that will affect the planning process.',
    'page callback' => 'farm_plan_consideration_list',
    'page arguments' => array(
      2,
    ),
    'access callback' => 'farm_plan_access',
    'access arguments' => array(
      'update',
      2,
    ),
    'type' => MENU_LOCAL_TASK,
  );

  // Add a new consideration.
  $items['farm/plan/%farm_plan/considerations/add'] = array(
    'title' => 'Add a consideration',
    'description' => 'Add a new planning consideration.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'farm_plan_consideration_form',
      2,
    ),
    'access callback' => 'farm_plan_access',
    'access arguments' => array(
      'update',
      2,
    ),
    'type' => MENU_LOCAL_ACTION,
  );

  // Edit an existing consideration.
  $items['farm/plan/%farm_plan/considerations/%/edit'] = array(
    'title' => 'Edit consideration',
    'description' => 'Edit an existing consideration.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'farm_plan_consideration_form',
      2,
      4,
    ),
    'access callback' => 'farm_plan_access',
    'access arguments' => array(
      'update',
      2,
    ),
  );

  // Delete a consideration.
  $items['farm/plan/%farm_plan/considerations/%/delete'] = array(
    'title' => 'Delete consideration',
    'description' => 'Delete a consideration.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'farm_plan_consideration_delete_form',
      2,
      4,
    ),
    'access callback' => 'farm_plan_access',
    'access arguments' => array(
      'update',
      2,
    ),
  );
  return $items;
}