You are here

function farm_plan_field_extra_fields in farmOS 7

Implements hook_field_extra_fields().

File

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

Code

function farm_plan_field_extra_fields() {
  $farm_plan_types = farm_plan_types();
  $extra_fields = array(
    'farm_plan' => array(),
  );
  foreach ($farm_plan_types as $type) {
    $extra_fields['farm_plan'][$type->type] = array(
      'form' => array(
        // Add plan name field to field UI.
        'name' => array(
          'label' => t('Name'),
          'description' => t('The name of the plan.'),
          'weight' => -10,
        ),
      ),
    );
  }
  return $extra_fields;
}