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