public ItemStorage::getItemCount(FeedInterface $feed)
Returns the count of the items in a feed.
Parameters
\Drupal\aggregator\FeedInterface $feed: The feed entity.
Return value
int The count of items associated with a feed.
Overrides ItemStorageInterface::getItemCount
File
- core/modules/aggregator/src/ItemStorage.php, line 19
Class
- ItemStorage
- Controller class for aggregators items.
Namespace
Drupal\aggregator
Code
public function getItemCount(FeedInterface $feed) {
$query = \Drupal::entityQuery('aggregator_item')
->condition('fid', $feed->id())
->count();
return $query->execute();
}
Please login to continue.