public static function PrepareUninstallForm::purgeFieldData in Simplenews 8
Same name and namespace in other branches
- 8.2 src/Form/PrepareUninstallForm.php \Drupal\simplenews\Form\PrepareUninstallForm::purgeFieldData()
- 3.x src/Form/PrepareUninstallForm.php \Drupal\simplenews\Form\PrepareUninstallForm::purgeFieldData()
Purges a field data.
File
- src/
Form/ PrepareUninstallForm.php, line 89
Class
- PrepareUninstallForm
- Removes fields and data used by Simplenews.
Namespace
Drupal\simplenews\FormCode
public static function purgeFieldData() {
do {
field_purge_batch(1000);
$properties = array(
'deleted' => TRUE,
'include_deleted' => TRUE,
);
$fields = \Drupal::entityTypeManager()
->getStorage('field_config')
->loadByProperties($properties);
} while ($fields);
}