mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-12-22 21:40:08 +00:00
57 lines
1.2 KiB
PHP
57 lines
1.2 KiB
PHP
<?php
|
|
namespace chat\acp\page;
|
|
use \wcf\system\WCF;
|
|
|
|
/**
|
|
* Lists available chatrooms.
|
|
*
|
|
* @author Tim Düsterhus
|
|
* @copyright 2010-2013 Tim Düsterhus
|
|
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>
|
|
* @package be.bastelstu.chat
|
|
* @subpackage acp.page
|
|
*/
|
|
class RoomListPage extends \wcf\page\AbstractPage {
|
|
/**
|
|
* @see \wcf\page\AbstractPage::$activeMenuItem
|
|
*/
|
|
public $activeMenuItem = 'chat.acp.menu.link.room.list';
|
|
|
|
/**
|
|
* @see \wcf\page\AbstractPage::$neededPermissions
|
|
*/
|
|
public $neededPermissions = array(
|
|
'admin.chat.canEditRoom',
|
|
'admin.chat.canDeleteRoom'
|
|
);
|
|
|
|
/**
|
|
* room list
|
|
* @var \chat\data\room\RoomListPage
|
|
*/
|
|
public $objects = null;
|
|
|
|
/**
|
|
* @see \wcf\page\IPage::readData()
|
|
*/
|
|
public function readData() {
|
|
parent::readData();
|
|
|
|
$this->objects = new \chat\data\room\RoomList();
|
|
$this->objects->sqlOrderBy = 'showOrder ASC';
|
|
$this->objects->getConditionBuilder()->add('permanent = ?', array(1));
|
|
$this->objects->readObjects();
|
|
}
|
|
|
|
/**
|
|
* @see wcf\page\IPage::assignVariables()
|
|
*/
|
|
public function assignVariables() {
|
|
parent::assignVariables();
|
|
|
|
WCF::getTPL()->assign(array(
|
|
'objects' => $this->objects
|
|
));
|
|
}
|
|
}
|