function units_mathematical_expression_delete in Units of Measurement 7.2
Delete a mathematical expression from data.
Parameters
int $mathematical_expression_id: Mathematical expression ID to be deleted
5 calls to units_mathematical_expression_delete()
- UnitsMathematicalExpressionWrapper::save in ./
units.module - Save the underlying mathematical expression into database.
- units_field_field_delete in units_field/
units_field.module - Implements hook_field_delete().
- units_field_field_delete_revision in units_field/
units_field.module - Implements hook_field_delete_revision().
- units_units_unit_delete in ./
units.module - Implements hook_ENTITY_TYPE_delete().
- units_units_unit_presave in ./
units.module - Implements hook_ENTITY_TYPE_presave().
File
- ./
units.module, line 664 - Provide API for managing and converting units of measurement.
Code
function units_mathematical_expression_delete($mathematical_expression_id) {
if (intval($mathematical_expression_id) > 0) {
db_delete('units_mathematical_expression_postfix')
->condition('mathematical_expression_id', $mathematical_expression_id)
->execute();
}
}