コード例 #1
0
 /**
  * Selected content that passed the Promoted threshold.
  *
  * This uses the Reactions caching system & options.
  *
  * @param array $Parameters Not used.
  * @return array|false $Content
  */
 protected function selectByPromoted($Parameters)
 {
     if (!class_exists('ReactionModel')) {
         return;
     }
     $RecordTypes = array();
     if ($this->ShowDiscussions()) {
         $RecordTypes[] = 'Discussion';
     }
     if ($this->ShowComments()) {
         $RecordTypes[] = 'Comment';
     }
     $ReactionModel = new ReactionModel();
     $PromotedTagID = $ReactionModel->DefineTag('Promoted', 'BestOf');
     $Content = $ReactionModel->GetRecordsWhere(array('TagID' => $PromotedTagID, 'RecordType' => $RecordTypes), 'DateInserted', 'desc', $this->Limit);
     $this->processContent($Content);
     return $Content;
 }