public function DateRecurOccurrences::onEntityTypeDelete in Recurring Dates Field 3.x
Same name and namespace in other branches
- 8.2 src/DateRecurOccurrences.php \Drupal\date_recur\DateRecurOccurrences::onEntityTypeDelete()
- 3.0.x src/DateRecurOccurrences.php \Drupal\date_recur\DateRecurOccurrences::onEntityTypeDelete()
- 3.1.x src/DateRecurOccurrences.php \Drupal\date_recur\DateRecurOccurrences::onEntityTypeDelete()
Reacts to the deletion of the entity type.
Parameters
\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type being deleted.
Overrides EntityTypeEventSubscriberTrait::onEntityTypeDelete
File
- src/
DateRecurOccurrences.php, line 245
Class
- DateRecurOccurrences
- Manages occurrences tables and the data that populates them.
Namespace
Drupal\date_recurCode
public function onEntityTypeDelete(EntityTypeInterface $entity_type) : void {
if (!$entity_type instanceof ContentEntityTypeInterface) {
// Only delete field for content entity types.
return;
}
foreach ($this
->getBaseFieldStorages($entity_type) as $baseFieldStorage) {
$this
->fieldStorageDelete($baseFieldStorage);
}
}