function ContentEntityStorageBase::purgeFieldData
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php \Drupal\Core\Entity\ContentEntityStorageBase::purgeFieldData()
- 10 core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php \Drupal\Core\Entity\ContentEntityStorageBase::purgeFieldData()
- 11.x core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php \Drupal\Core\Entity\ContentEntityStorageBase::purgeFieldData()
File
-
core/
lib/ Drupal/ Core/ Entity/ ContentEntityStorageBase.php, line 556
Class
- ContentEntityStorageBase
- Base class for content entity storage handlers.
Namespace
Drupal\Core\EntityCode
public function purgeFieldData(FieldDefinitionInterface $field_definition, $batch_size) {
$items_by_entity = $this->readFieldItemsToPurge($field_definition, $batch_size);
foreach ($items_by_entity as $items) {
$items->delete();
$this->purgeFieldItems($items->getEntity(), $field_definition);
}
return count($items_by_entity);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.