You are here

function farm_log_farm_log_prepopulate_reference_fields in farmOS 7

Implements hook_farm_log_prepopulate_reference_fields().

File

modules/farm/farm_log/farm_log.module, line 491
Code for the Farm Log feature.

Code

function farm_log_farm_log_prepopulate_reference_fields($log_type) {

  // Define the fields that will be prepopulated in log forms.
  return array(
    'field_farm_asset' => array(
      'entity_type' => 'farm_asset',
      'url_param' => 'farm_asset',
    ),
    'field_farm_area' => array(
      'entity_type' => 'taxonomy_term',
      'url_param' => 'farm_area',
    ),
    'field_farm_log_category' => array(
      'entity_type' => 'taxonomy_term',
      'lookup' => TRUE,
      'vocabulary' => 'farm_log_categories',
      'url_param' => 'category',
    ),
    'field_farm_log_owner' => array(
      'entity_type' => 'user',
    ),
  );
}