function ItemStorage::getItemCount

Same name in other branches
  1. 9 core/modules/aggregator/src/ItemStorage.php \Drupal\aggregator\ItemStorage::getItemCount()

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();
}

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