function ItemStorage::executeFeedItemQuery
Same name in other branches
- 8.9.x 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());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.