You are here

function farm_asset_add_types_page in farmOS 7

Page to select asset type to add new asset.

1 string reference to 'farm_asset_add_types_page'
farm_asset_menu in modules/farm/farm_asset/farm_asset.module
Implements hook_menu().

File

modules/farm/farm_asset/farm_asset.pages.inc, line 32
Farm asset pages.

Code

function farm_asset_add_types_page() {
  $items = array();
  foreach (farm_asset_types() as $farm_asset_type_key => $farm_asset_type) {
    if (farm_asset_access('create', $farm_asset_type)) {
      $items[] = l(entity_label('farm_asset_type', $farm_asset_type), 'farm/asset/add/' . $farm_asset_type_key);
    }
  }
  return array(
    'list' => array(
      '#theme' => 'item_list',
      '#items' => $items,
      '#title' => t('Select a type of asset to create.'),
    ),
  );
}