function farm_asset_type_get_names in farmOS 7
Get the names of all asset types.
Return value
array Returns an array of asset type names, keyed by machine name.
1 call to farm_asset_type_get_names()
- farm_asset_entity_view in modules/
farm/ farm_asset/ farm_asset.module - Implements hook_entity_view().
1 string reference to 'farm_asset_type_get_names'
- farm_asset_entity_property_info_alter in modules/
farm/ farm_asset/ farm_asset.module - Implements hook_entity_property_info_alter().
File
- modules/
farm/ farm_asset/ farm_asset.module, line 908 - Farm asset - A farm asset entity type.
Code
function farm_asset_type_get_names() {
$names = array();
$types = farm_asset_types();
foreach ($types as $type) {
$names[$type->type] = $type->label;
}
return $names;
}