function farm_asset_field_extra_fields in farmOS 7
Implements hook_field_extra_fields().
File
- modules/
farm/ farm_asset/ farm_asset.module, line 296 - Farm asset - A farm asset entity type.
Code
function farm_asset_field_extra_fields() {
$farm_asset_types = farm_asset_types();
$extra_fields = array(
'farm_asset' => array(),
);
foreach ($farm_asset_types as $type) {
$extra_fields['farm_asset'][$type->type] = array(
'form' => array(
// Add asset name field to field UI.
'name' => array(
'label' => t('Name'),
'description' => t('The name of the asset.'),
'weight' => -10,
),
),
);
}
return $extra_fields;
}