示例#1
0
 protected function getEntries($context, $orderBy = null, $limit = null)
 {
     $context->hasNextPage = false;
     $entries = parent::getEntries($context, null, $this->profile->getItemsPerPage() + 1);
     // get +1 to check if we have next page
     if (count($entries) === $this->profile->getItemsPerPage() + 1) {
         // we tried to get (itemsPerPage + 1) entries, meaning we have another page
         $context->hasNextPage = true;
         unset($entries[$this->profile->getItemsPerPage()]);
     }
     $this->fillnextStateDependentFields($context, $entries);
     return $entries;
 }
示例#2
0
 protected function doneFeedGeneration($context, $feed)
 {
     $feed->setChannelLastBuildDate($context->lastBuildDate);
     return parent::doneFeedGeneration($context, $feed);
 }
示例#3
0
 protected function doneFeedGeneration($context, $feed)
 {
     $channelTitle = isset($context->channelTitle) ? $context->channelTitle : $this->profile->getChannelTitle();
     $feed->setChannelTitle($channelTitle);
     return parent::doneFeedGeneration($context, $feed);
 }