3 namespace wcf\data\conversation
;
8 * Represents a list of conversations for RSS feeds.
10 * @author Alexander Ebert
11 * @copyright 2001-2019 WoltLab GmbH
12 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
13 * @package WoltLabSuite\Core\Data\Conversation
15 * @method FeedConversation current()
16 * @method FeedConversation[] getObjects()
17 * @method FeedConversation|null search($objectID)
18 * @property FeedConversation[] $objects
20 class FeedConversationList
extends ConversationList
25 public $decoratorClassName = FeedConversation
::class;
30 public $sqlOrderBy = 'conversation.lastPostTime DESC';
35 public function readObjectIDs()
37 $sql = "SELECT conversation_to_user.conversationID AS objectID
38 FROM wcf" . WCF_N
. "_conversation_to_user conversation_to_user
39 " . $this->sqlConditionJoins
. "
40 " . $this->getConditionBuilder() . "
41 " . (!empty($this->sqlOrderBy
) ?
"ORDER BY " . $this->sqlOrderBy
: '');
42 $statement = WCF
::getDB()->prepareStatement($sql, $this->sqlLimit
, $this->sqlOffset
);
43 $statement->execute($this->getConditionBuilder()->getParameters());
44 $this->objectIDs
= $statement->fetchAll(\PDO
::FETCH_COLUMN
);
50 public function readObjects()
52 if ($this->objectIDs
=== null) {
53 $this->readObjectIDs();
56 parent
::readObjects();