You are here

public function ItemStorage::loadByFeed in MongoDB 8

Loads feed items filtered by a feed.

Parameters

int $fid: The feed ID to filter by.

int $limit: (optional) The number of items to return. Defaults to unlimited.

Return value

\Drupal\aggregator\ItemInterface[] An array of the feed items.

Overrides ItemStorageInterface::loadByFeed

File

mongodb_aggregator/src/Entity/ItemStorage.php, line 44
Contains \Drupal\aggregator\ItemStorage.

Class

ItemStorage
This is 100% identical to the core item storage class, should be removed if core removes.

Namespace

Drupal\mongodb_aggregator\Entity

Code

public function loadByFeed($fid, $limit = NULL) {
  $query = \Drupal::entityQuery('aggregator_item')
    ->condition('fid', $fid);
  return $this
    ->executeFeedItemQuery($query, $limit);
}