protected function ItemStorage::executeFeedItemQuery in Zircon Profile 8
Same name and namespace in other branches
- 8.0 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 60 - Contains \Drupal\aggregator\ItemStorage.
Class
- ItemStorage
- Controller class for aggregators items.
Namespace
Drupal\aggregatorCode
protected function executeFeedItemQuery(QueryInterface $query, $limit) {
$query
->sort('timestamp', 'DESC')
->sort('iid', 'DESC');
if (!empty($limit)) {
$query
->pager($limit);
}
return $this
->loadMultiple($query
->execute());
}