You are here

public function ItemStorage::loadByFeed in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/aggregator/src/ItemStorage.php \Drupal\aggregator\ItemStorage::loadByFeed()

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

core/modules/aggregator/src/ItemStorage.php, line 43
Contains \Drupal\aggregator\ItemStorage.

Class

ItemStorage
Controller class for aggregators items.

Namespace

Drupal\aggregator

Code

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