1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2025-01-19 01:30:41 +00:00
Tims-Chat/file/lib/acp/page/RoomListPage.class.php

57 lines
1.2 KiB
PHP
Raw Normal View History

2012-02-04 20:50:18 +01:00
<?php
2013-01-27 20:10:06 +01:00
namespace chat\acp\page;
2013-04-05 22:23:52 +02:00
use \wcf\system\WCF;
2012-02-04 20:50:18 +01:00
/**
* Lists available chatrooms.
*
2012-02-04 21:06:44 +01:00
* @author Tim Düsterhus
2014-02-27 23:05:09 +01:00
* @copyright 2010-2014 Tim Düsterhus
2012-02-04 21:06:44 +01:00
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>
2013-01-19 20:36:40 +01:00
* @package be.bastelstu.chat
2012-02-04 20:50:18 +01:00
* @subpackage acp.page
*/
2013-04-05 22:23:52 +02:00
class RoomListPage extends \wcf\page\AbstractPage {
2013-01-07 20:34:18 +01:00
/**
* @see \wcf\page\AbstractPage::$activeMenuItem
*/
2013-01-19 20:36:40 +01:00
public $activeMenuItem = 'chat.acp.menu.link.room.list';
2013-01-07 20:34:18 +01:00
2012-02-04 20:50:18 +01:00
/**
* @see \wcf\page\AbstractPage::$neededPermissions
2012-02-04 20:50:18 +01:00
*/
public $neededPermissions = array(
2013-01-19 20:36:40 +01:00
'admin.chat.canEditRoom',
'admin.chat.canDeleteRoom'
2012-02-04 20:50:18 +01:00
);
/**
2013-04-05 22:23:52 +02:00
* room list
* @var \chat\data\room\RoomListPage
2012-02-04 20:50:18 +01:00
*/
2013-04-05 22:23:52 +02:00
public $objects = null;
2012-02-04 20:50:18 +01:00
/**
2013-04-05 22:23:52 +02:00
* @see \wcf\page\IPage::readData()
2012-02-04 20:50:18 +01:00
*/
2013-04-05 22:23:52 +02:00
public function readData() {
parent::readData();
$this->objects = new \chat\data\room\RoomList();
2013-05-24 00:08:33 +02:00
$this->objects->sqlOrderBy = 'showOrder ASC';
2013-05-31 02:07:03 +02:00
$this->objects->getConditionBuilder()->add('permanent = ?', array(1));
2013-04-05 22:23:52 +02:00
$this->objects->readObjects();
}
2012-02-04 20:50:18 +01:00
/**
2013-04-05 22:23:52 +02:00
* @see wcf\page\IPage::assignVariables()
2012-02-04 20:50:18 +01:00
*/
2013-04-05 22:23:52 +02:00
public function assignVariables() {
parent::assignVariables();
WCF::getTPL()->assign(array(
'objects' => $this->objects
));
}
2012-02-04 20:50:18 +01:00
}