You are here

function farm_plan_add_types_page in farmOS 7

Page to select plan type to add new plan.

1 string reference to 'farm_plan_add_types_page'
farm_plan_menu in modules/farm/farm_plan/farm_plan.module
Implements hook_menu().

File

modules/farm/farm_plan/farm_plan.pages.inc, line 32
Farm plan pages.

Code

function farm_plan_add_types_page() {
  $items = array();
  foreach (farm_plan_types() as $farm_plan_type_key => $farm_plan_type) {
    if (farm_plan_access('create', $farm_plan_type)) {
      $items[] = l(entity_label('farm_plan_type', $farm_plan_type), 'farm/plan/add/' . $farm_plan_type_key);
    }
  }
  return array(
    'list' => array(
      '#theme' => 'item_list',
      '#items' => $items,
      '#title' => t('Select a type of plan to create.'),
    ),
  );
}