You are here

public function EntityProcessorBase::onFeedDeleteMultiple in Feeds 8.3

@todo Sort this out so that we aren't calling \Drupal::database()->delete() here.

Overrides PluginBase::onFeedDeleteMultiple

File

src/Feeds/Processor/EntityProcessorBase.php, line 1148

Class

EntityProcessorBase
Defines a base entity processor.

Namespace

Drupal\feeds\Feeds\Processor

Code

public function onFeedDeleteMultiple(array $feeds) {
  $fids = [];
  foreach ($feeds as $feed) {
    $fids[] = $feed
      ->id();
  }
  $table = $this
    ->entityType() . '__feeds_item';
  \Drupal::database()
    ->delete($table)
    ->condition('feeds_item_target_id', $fids, 'IN')
    ->execute();
}