function farm_livestock_weight_menu in farmOS 7
Implements hook_menu().
File
- modules/
farm/ farm_livestock/ farm_livestock_weight/ farm_livestock_weight.module, line 228 - Farm livestock weight module.
Code
function farm_livestock_weight_menu() {
$items = array();
// Farm asset uri for the view path
$farm_asset_uri = 'farm/asset/%farm_asset';
$farm_asset_uri_argument_position = 2;
// Animal asset report tab.
$items[$farm_asset_uri . '/weight'] = array(
'title' => t('Weight'),
'page callback' => 'farm_livestock_weight_individual_report',
'page arguments' => array(
$farm_asset_uri_argument_position,
),
'access callback' => 'farm_livestock_weight_individual_report_access',
'access arguments' => array(
$farm_asset_uri_argument_position,
),
'file' => 'farm_livestock_weight.report.inc',
'type' => MENU_LOCAL_TASK,
'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
);
// Animal group report form.
$items['farm/report/weight'] = array(
'title' => t('Animal Weights'),
'page callback' => 'drupal_get_form',
'page arguments' => array(
'farm_livestock_weight_group_report_form',
),
'access arguments' => array(
'view farm reports',
),
'type' => MENU_LOCAL_TASK,
);
return $items;
}