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

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
2016-10-29 09:21:28
Comments
Leave a Comment

Please login to continue.