Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / lib / Drupal / Core / Entity / FieldableEntityStorageInterface.php
index 4d91b2945015316b0ac333c6f13f0a50bf6fedfc..79c57f9dc55585fe76efab9dc7f5d7d5dc34ab2e 100644 (file)
@@ -2,6 +2,9 @@
 
 namespace Drupal\Core\Entity;
 
+use Drupal\Core\Field\FieldDefinitionInterface;
+use Drupal\Core\Field\FieldStorageDefinitionInterface;
+
 /**
  * A storage that supports entity types with field definitions.
  */
@@ -24,4 +27,27 @@ interface FieldableEntityStorageInterface extends EntityStorageInterface {
    */
   public function countFieldData($storage_definition, $as_bool = FALSE);
 
+  /**
+   * Purges a batch of field data.
+   *
+   * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition
+   *   The deleted field whose data is being purged.
+   * @param int $batch_size
+   *   The maximum number of field data records to purge before returning,
+   *   relating to the count of field data records returned by
+   *   \Drupal\Core\Entity\FieldableEntityStorageInterface::countFieldData().
+   *
+   * @return int
+   *   The number of field data records that have been purged.
+   */
+  public function purgeFieldData(FieldDefinitionInterface $field_definition, $batch_size);
+
+  /**
+   * Performs final cleanup after all data of a field has been purged.
+   *
+   * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $storage_definition
+   *   The field storage being purged.
+   */
+  public function finalizePurge(FieldStorageDefinitionInterface $storage_definition);
+
 }