protected function FeedRefresh::feedExists in Feeds 8.3
Returns if a feed entity still exists or not.
Parameters
\Drupal\feeds\FeedInterface $feed: The feed entity to check for existance in the database.
Return value
bool True if the feed still exists, false otherwise.
1 call to FeedRefresh::feedExists()
- FeedRefresh::processItem in src/
Plugin/ QueueWorker/ FeedRefresh.php - Works on a single queue item.
File
- src/
Plugin/ QueueWorker/ FeedRefresh.php, line 58
Class
- FeedRefresh
- A queue worker for importing feeds.
Namespace
Drupal\feeds\Plugin\QueueWorkerCode
protected function feedExists(FeedInterface $feed) {
// Check if the feed still exists.
$result = $this->entityTypeManager
->getStorage($feed
->getEntityTypeId())
->getQuery()
->condition('fid', $feed
->id())
->execute();
if (empty($result)) {
// The feed in question has been deleted.
return FALSE;
}
return TRUE;
}