You are here

function farm_movement_asset_location_property_get in farmOS 7

Getter callback for the location asset property.

1 string reference to 'farm_movement_asset_location_property_get'
farm_movement_entity_property_info_alter in modules/farm/farm_movement/farm_movement.module
Implements hook_entity_property_info_alter().

File

modules/farm/farm_movement/farm_movement.module, line 49
Farm movement.

Code

function farm_movement_asset_location_property_get($data, array $options, $name, $type, $info) {

  // If the asset doesn't have an ID, bail.
  if (empty($data->id)) {
    return array();
  }

  // Look up the asset location.
  $areas = farm_movement_asset_location($data);

  // Return the areas.
  return $areas;
}