3 namespace Drupal\Core\Entity;
5 use Drupal\Core\Field\FieldDefinitionInterface;
6 use Drupal\Core\Field\FieldDefinitionListenerInterface;
7 use Drupal\Core\Field\FieldStorageDefinitionInterface;
8 use Drupal\Core\Field\FieldStorageDefinitionListenerInterface;
11 * A storage that supports entity types with dynamic field definitions.
13 * A storage that implements this interface can react to the entity type's field
14 * definitions changing, due to modules being installed or uninstalled, or via
15 * field UI, or via code changes to the entity class.
17 * For example, configurable fields defined and exposed by field.module.
19 interface DynamicallyFieldableEntityStorageInterface extends FieldableEntityStorageInterface, FieldStorageDefinitionListenerInterface, FieldDefinitionListenerInterface {
22 * Purges a batch of field data.
24 * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition
25 * The deleted field whose data is being purged.
27 * The maximum number of field data records to purge before returning,
28 * relating to the count of field data records returned by
29 * \Drupal\Core\Entity\FieldableEntityStorageInterface::countFieldData().
32 * The number of field data records that have been purged.
34 public function purgeFieldData(FieldDefinitionInterface $field_definition, $batch_size);
37 * Performs final cleanup after all data of a field has been purged.
39 * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $storage_definition
40 * The field being purged.
42 public function finalizePurge(FieldStorageDefinitionInterface $storage_definition);