function field_sql_storage_field_storage_delete_revision
field_sql_storage_field_storage_delete_revision($entity_type, $entity, $fields)
Implements hook_field_storage_delete_revision().
This function actually deletes the data from the database.
File
- modules/field/modules/field_sql_storage/field_sql_storage.module, line 728
- Default implementation of the field storage API.
Code
function field_sql_storage_field_storage_delete_revision($entity_type, $entity, $fields) { list($id, $vid, $bundle) = entity_extract_ids($entity_type, $entity); if (isset($vid)) { foreach ($fields as $field_id) { $field = field_info_field_by_id($field_id); $revision_name = _field_sql_storage_revision_tablename($field); db_delete($revision_name) ->condition('entity_type', $entity_type) ->condition('entity_id', $id) ->condition('revision_id', $vid) ->execute(); } } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!field!modules!field_sql_storage!field_sql_storage.module/function/field_sql_storage_field_storage_delete_revision/7.x