function farm_inventory_entity_delete in farmOS 7
Implements hook_entity_delete().
File
- modules/
farm/ farm_inventory/ farm_inventory.module, line 187
Code
function farm_inventory_entity_delete($entity, $type) {
// Only act on farm_asset_type entities.
if ($type != 'farm_asset_type') {
return;
}
// If the asset machine name is not set, bail.
if (empty($entity->type)) {
return;
}
// Delete settings for this asset type.
_farm_inventory_asset_type_settings_delete($entity->type);
}