You are here

function farm_movement_asset_geometry_property_get in farmOS 7

Getter callback for the geometry asset property.

1 string reference to 'farm_movement_asset_geometry_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 66
Farm movement.

Code

function farm_movement_asset_geometry_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 geometry.
  $geometry = farm_movement_asset_geometry($data);

  // Return the geometry.
  return $geometry;
}