protected function ItemStorage::executeFeedItemQuery in Drupal 9
Same name and namespace in other branches
- 8 core/modules/aggregator/src/ItemStorage.php \Drupal\aggregator\ItemStorage::executeFeedItemQuery()
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.
2 calls to ItemStorage::executeFeedItemQuery()
- ItemStorage::loadAll in core/
modules/ aggregator/ src/ ItemStorage.php - Loads feed items from all feeds.
- ItemStorage::loadByFeed in core/
modules/ aggregator/ src/ ItemStorage.php - Loads feed items filtered by a feed.
File
- core/
modules/ aggregator/ src/ ItemStorage.php, line 56
Class
- ItemStorage
- Defines the storage handler class for feed item entities.
Namespace
Drupal\aggregatorCode
protected function executeFeedItemQuery(QueryInterface $query, $limit) {
$query
->accessCheck(FALSE)
->sort('timestamp', 'DESC')
->sort('iid', 'DESC');
if (!empty($limit)) {
$query
->pager($limit);
}
return $this
->loadMultiple($query
->execute());
}