You are here

function farm_plan_types in farmOS 7

List of plan types.

Parameters

string $type_name: The farm plan type name.

Return value

FarmPlanType|array Returns either a single type, or an array of types.

11 calls to farm_plan_types()
farm_plan_access in modules/farm/farm_plan/farm_plan.module
Access callback for plan entities.
farm_plan_add in modules/farm/farm_plan/farm_plan.pages.inc
Add new plan page callback.
farm_plan_add_access in modules/farm/farm_plan/farm_plan.module
Access callback: Checks whether the user has permission to add a plan.
farm_plan_add_types_page in modules/farm/farm_plan/farm_plan.pages.inc
Page to select plan type to add new plan.
farm_plan_entity_info_alter in modules/farm/farm_plan/farm_plan.module
Implements hook_entity_info_alter().

... See full list

1 string reference to 'farm_plan_types'
farm_plan_type_form in modules/farm/farm_plan/farm_plan.admin.inc
Generates the farm plan type editing form.

File

modules/farm/farm_plan/farm_plan.module, line 644
Farm plan - A farm plan entity type.

Code

function farm_plan_types($type_name = NULL) {
  $types = entity_load_multiple_by_name('farm_plan_type', isset($type_name) ? array(
    $type_name,
  ) : FALSE);
  return isset($type_name) ? reset($types) : $types;
}