1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-12-26 22:20:08 +00:00
Tims-Chat/file/lib/acp/page/RoomListPage.class.php

57 lines
1.2 KiB
PHP
Raw Normal View History

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