function farm_movement_area_assets_property_get in farmOS 7
Getter callback for the area assets property.
1 string reference to 'farm_movement_area_assets_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 83 - Farm movement.
Code
function farm_movement_area_assets_property_get($data, array $options, $name, $type, $info) {
// If the area doesn't have an ID, bail.
if (empty($data->tid)) {
return array();
}
// Load assets in this area.
$assets = farm_movement_area_assets($data);
// Strip the array keys.
$assets = array_values($assets);
// Return the assets.
return $assets;
}