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
protected function executeFeedItemQuery(QueryInterface $query, $limit) {
$query->sort('timestamp', 'DESC')
->sort('iid', 'DESC');
if (!empty($limit)) {
$query->pager($limit);
}
return $this->loadMultiple($query->execute());
}
Please login to continue.