You are here

function hook_farm_log_prepopulate_reference_fields in farmOS 7

Allow modules to provide information about fields that should be prepopulated in log forms.

Parameters

string $log_type: The log type.

Return value

array Returns an array of field information.

Related topics

2 functions implement hook_farm_log_prepopulate_reference_fields()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

farm_livestock_farm_log_prepopulate_reference_fields in modules/farm/farm_livestock/farm_livestock.module
Implements hook_farm_log_prepopulate_reference_fields().
farm_log_farm_log_prepopulate_reference_fields in modules/farm/farm_log/farm_log.module
Implements hook_farm_log_prepopulate_reference_fields().
1 invocation of hook_farm_log_prepopulate_reference_fields()
farm_log_prepopulate_log_form_references in modules/farm/farm_log/farm_log.module
Helper function for populating entity reference fields in log forms.

File

modules/farm/farm_log/farm_log.api.php, line 73
Hooks provided by farm_log.

Code

function hook_farm_log_prepopulate_reference_fields($log_type) {
  return array(
    'field_farm_asset' => array(
      'entity_type' => 'farm_asset',
      'url_param' => 'farm_asset',
    ),
  );
}