You are here

public function EntityProcessorBase::expireItem in Feeds 8.3

Deletes feed items older than REQUEST_TIME - $time.

Do not invoke expire on a processor directly. This is called automatically after an import completes.

Parameters

\Drupal\feeds\FeedInterface $feed: The feed to expire items for.

int $item_id: The feed item id to expire.

\Drupal\feeds\StateInterface $state: The state object.

Overrides ProcessorInterface::expireItem

File

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

Class

EntityProcessorBase
Defines a base entity processor.

Namespace

Drupal\feeds\Feeds\Processor

Code

public function expireItem(FeedInterface $feed, $item_id, StateInterface $state) {
  $this
    ->entityDeleteMultiple([
    $item_id,
  ]);
  $state->total++;
}