field_purge_field(FieldConfigInterface $field)
Purges a field record from the database.
This function assumes all data for the field has already been purged and should only be called by field_purge_batch().
Parameters
$field: The field record to purge.
Related topics
- Field API bulk data deletion
- Cleans up after Field API bulk deletion operations.
File
- core/modules/field/field.purge.inc, line 140
- Provides support for field data purge after mass deletion.
Code
function field_purge_field(FieldConfigInterface $field) { $state = \Drupal::state(); $deleted_fields = $state->get('field.field.deleted'); unset($deleted_fields[$field->uuid()]); $state->set('field.field.deleted', $deleted_fields); // Invoke external hooks after the cache is cleared for API consistency. \Drupal::moduleHandler()->invokeAll('field_purge_field', array($field)); }
Please login to continue.