ItemStorage::executeFeedItemQuery

protected ItemStorage::executeFeedItemQuery(QueryInterface $query, $limit)

Helper method to execute an item query.

Parameters

\Drupal\Core\Entity\Query\QueryInterface $query: The query to execute.

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

Return value

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

File

core/modules/aggregator/src/ItemStorage.php, line 55

Class

ItemStorage
Controller class for aggregators items.

Namespace

Drupal\aggregator

Code

1
2
3
4
5
6
7
8
9
protected function executeFeedItemQuery(QueryInterface $query, $limit) {
  $query->sort('timestamp', 'DESC')
    ->sort('iid', 'DESC');
  if (!empty($limit)) {
    $query->pager($limit);
  }
 
  return $this->loadMultiple($query->execute());
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.