annotate core/modules/aggregator/src/ItemStorageInterface.php @ 19:fa3358dc1485 tip

Add ndrum files
author Chris Cannam
date Wed, 28 Aug 2019 13:14:47 +0100
parents 4c8ae668cc8c
children
rev   line source
Chris@0 1 <?php
Chris@0 2
Chris@0 3 namespace Drupal\aggregator;
Chris@0 4
Chris@0 5 use Drupal\Core\Entity\ContentEntityStorageInterface;
Chris@0 6
Chris@0 7 /**
Chris@0 8 * Defines an interface for aggregator item entity storage classes.
Chris@0 9 */
Chris@0 10 interface ItemStorageInterface extends ContentEntityStorageInterface {
Chris@0 11
Chris@0 12 /**
Chris@0 13 * Returns the count of the items in a feed.
Chris@0 14 *
Chris@0 15 * @param \Drupal\aggregator\FeedInterface $feed
Chris@0 16 * The feed entity.
Chris@0 17 *
Chris@0 18 * @return int
Chris@0 19 * The count of items associated with a feed.
Chris@0 20 */
Chris@0 21 public function getItemCount(FeedInterface $feed);
Chris@0 22
Chris@0 23 /**
Chris@0 24 * Loads feed items from all feeds.
Chris@0 25 *
Chris@0 26 * @param int $limit
Chris@0 27 * (optional) The number of items to return. Defaults to unlimited.
Chris@0 28 *
Chris@0 29 * @return \Drupal\aggregator\ItemInterface[]
Chris@0 30 * An array of the feed items.
Chris@0 31 */
Chris@0 32 public function loadAll($limit = NULL);
Chris@0 33
Chris@0 34 /**
Chris@0 35 * Loads feed items filtered by a feed.
Chris@0 36 *
Chris@0 37 * @param int $fid
Chris@0 38 * The feed ID to filter by.
Chris@0 39 * @param int $limit
Chris@0 40 * (optional) The number of items to return. Defaults to unlimited.
Chris@0 41 *
Chris@0 42 * @return \Drupal\aggregator\ItemInterface[]
Chris@0 43 * An array of the feed items.
Chris@0 44 */
Chris@0 45 public function loadByFeed($fid, $limit = NULL);
Chris@0 46
Chris@0 47 }