Update npm dependencies
[GitHub/WoltLab/com.woltlab.wcf.conversation.git] / files / lib / page / ConversationFeedPage.class.php
1 <?php
2
3 namespace wcf\page;
4
5 use wcf\data\conversation\FeedConversationList;
6 use wcf\system\WCF;
7
8 /**
9 * Shows most recent conversations.
10 *
11 * @author Alexander Ebert
12 * @copyright 2001-2019 WoltLab GmbH
13 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
14 * @package WoltLabSuite\Core\Page
15 */
16 class ConversationFeedPage extends AbstractFeedPage
17 {
18 /**
19 * @inheritDoc
20 */
21 public $loginRequired = true;
22
23 /**
24 * @inheritDoc
25 */
26 public function readData()
27 {
28 parent::readData();
29
30 $this->items = new FeedConversationList();
31 $this->items->getConditionBuilder()->add('conversation_to_user.participantID = ?', [WCF::getUser()->userID]);
32 $this->items->getConditionBuilder()->add('conversation_to_user.hideConversation = ?', [0]);
33 $this->items->sqlConditionJoins = "
34 LEFT JOIN wcf" . WCF_N . "_conversation conversation
35 ON conversation.conversationID = conversation_to_user.conversationID";
36 $this->items->sqlLimit = 20;
37 $this->items->readObjects();
38
39 $this->title = WCF::getLanguage()->get('wcf.conversation.conversations');
40 }
41 }