function Feed::preDelete

Same name in other branches
  1. 8.9.x core/modules/aggregator/src/Entity/Feed.php \Drupal\aggregator\Entity\Feed::preDelete()

Overrides EntityBase::preDelete

File

core/modules/aggregator/src/Entity/Feed.php, line 109

Class

Feed
Defines the aggregator feed entity class.

Namespace

Drupal\aggregator\Entity

Code

public static function preDelete(EntityStorageInterface $storage, array $entities) {
    foreach ($entities as $entity) {
        // Notify processors to delete stored items.
        \Drupal::service('aggregator.items.importer')->delete($entity);
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.