function FieldPurger::purgeFieldDefinition

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Field/FieldPurger.php \Drupal\Core\Field\FieldPurger::purgeFieldDefinition()

Purges a field definition from the database.

This function assumes all data for the field has already been purged and should only be called by purgeBatch().

Parameters

\Drupal\Core\Field\FieldDefinitionInterface $field: The field definition to purge.

File

core/lib/Drupal/Core/Field/FieldPurger.php, line 151

Class

FieldPurger

Namespace

Drupal\Core\Field

Code

protected function purgeFieldDefinition(FieldDefinitionInterface $field) : void {
  $this->deletedFieldsRepository
    ->removeFieldDefinition($field);
  // Invoke external hooks after the cache is cleared for API consistency.
  $this->moduleHandler
    ->invokeAll('field_purge_field', [
    $field,
  ]);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.