9f9c54f7b74bec3793f0e5ca3268b1aa05bc2015
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';
32 /** @noinspection PhpMissingParentCallCommonInspection */
37 public function readObjectIDs()
39 $sql = "SELECT conversation_to_user.conversationID AS objectID
40 FROM wcf" . WCF_N
. "_conversation_to_user conversation_to_user
41 " . $this->sqlConditionJoins
. "
42 " . $this->getConditionBuilder() . "
43 " . (!empty($this->sqlOrderBy
) ?
"ORDER BY " . $this->sqlOrderBy
: '');
44 $statement = WCF
::getDB()->prepareStatement($sql, $this->sqlLimit
, $this->sqlOffset
);
45 $statement->execute($this->getConditionBuilder()->getParameters());
46 $this->objectIDs
= $statement->fetchAll(\PDO
::FETCH_COLUMN
);
52 public function readObjects()
54 if ($this->objectIDs
=== null) {
55 $this->readObjectIDs();
58 parent
::readObjects();