Beispiel #1
0
 /**
  * Content area
  *
  * Shows the list of popular notices
  *
  * @return void
  */
 function showContent()
 {
     $stream = new PopularNoticeStream(Profile::current());
     $notice = $stream->getNotices(($this->page - 1) * NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1);
     $nl = new NoticeList($notice, $this);
     $cnt = $nl->show();
     if ($cnt == 0) {
         $this->showEmptyList();
     }
     $this->pagination($this->page > 1, $cnt > NOTICES_PER_PAGE, $this->page, 'favorited');
 }
 function getNotices()
 {
     $stream = new PopularNoticeStream($this->viewer);
     return $stream->getNotices(0, NOTICES_PER_SECTION + 1);
 }