added license and copyright annotations
improved phpdoc
This commit is contained in:
@ -20,9 +20,11 @@ use ManiaControl\Players\PlayerManager;
|
||||
* Class managing Actions Menus
|
||||
*
|
||||
* @author steeffeen & kremsy
|
||||
* @copyright ManiaControl Copyright © 2014 ManiaControl Team
|
||||
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
||||
*/
|
||||
class ActionsMenu implements CallbackListener, ManialinkPageAnswerListener {
|
||||
/**
|
||||
/*
|
||||
* Constants
|
||||
*/
|
||||
const MLID_MENU = 'ActionsMenu.MLID';
|
||||
@ -32,7 +34,7 @@ class ActionsMenu implements CallbackListener, ManialinkPageAnswerListener {
|
||||
const ACTION_OPEN_ADMIN_MENU = 'ActionsMenu.OpenAdminMenu';
|
||||
const ACTION_OPEN_PLAYER_MENU = 'ActionsMenu.OpenPlayerMenu';
|
||||
|
||||
/**
|
||||
/*
|
||||
* Private Properties
|
||||
*/
|
||||
private $maniaControl = null;
|
||||
|
@ -1,14 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: Lukas
|
||||
* Date: 31.01.14
|
||||
* Time: 12:54
|
||||
*/
|
||||
|
||||
namespace ManiaControl\Admin;
|
||||
|
||||
|
||||
use FML\Controls\Control;
|
||||
use FML\Controls\Frame;
|
||||
use FML\Controls\Labels\Label_Button;
|
||||
@ -25,15 +18,22 @@ use ManiaControl\Manialinks\ManialinkManager;
|
||||
use ManiaControl\Manialinks\ManialinkPageAnswerListener;
|
||||
use ManiaControl\Players\Player;
|
||||
|
||||
/**
|
||||
* Widget Class listing Authorized Players
|
||||
*
|
||||
* @author kremsy
|
||||
* @copyright ManiaControl Copyright © 2014 ManiaControl Team
|
||||
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
||||
*/
|
||||
class AdminLists implements ManialinkPageAnswerListener, CallbackListener {
|
||||
/**
|
||||
/*
|
||||
* Constants
|
||||
*/
|
||||
const ACTION_OPEN_ADMINLISTS = "AdminList.OpenAdminLists";
|
||||
const ACTION_REVOKE_RIGHTS = "AdminList.RevokeRights";
|
||||
const MAX_PLAYERS_PER_PAGE = 15;
|
||||
|
||||
/**
|
||||
/*
|
||||
* Private Properties
|
||||
*/
|
||||
private $adminListShown = array();
|
||||
@ -51,7 +51,6 @@ class AdminLists implements ManialinkPageAnswerListener, CallbackListener {
|
||||
$this->maniaControl->callbackManager->registerCallbackListener(ManialinkManager::CB_MAIN_WINDOW_OPENED, $this, 'handleWidgetOpened');
|
||||
$this->maniaControl->callbackManager->registerCallbackListener(AuthenticationManager::CB_AUTH_LEVEL_CHANGED, $this, 'updateWidget');
|
||||
|
||||
|
||||
// Menu Entry AdminList
|
||||
$this->maniaControl->manialinkManager->registerManialinkPageAnswerListener(self::ACTION_OPEN_ADMINLISTS, $this, 'openAdminList');
|
||||
$itemQuad = new Quad_UIConstruction_Buttons();
|
||||
@ -60,10 +59,21 @@ class AdminLists implements ManialinkPageAnswerListener, CallbackListener {
|
||||
$this->maniaControl->actionsMenu->addMenuItem($itemQuad, false, 50, 'Open Adminlist');
|
||||
}
|
||||
|
||||
/**
|
||||
* Open Admin List Action
|
||||
*
|
||||
* @param array $callback
|
||||
* @param Player $player
|
||||
*/
|
||||
public function openAdminList(array $callback, Player $player) {
|
||||
$this->showAdminLists($player);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the Admin List
|
||||
*
|
||||
* @param Player $player
|
||||
*/
|
||||
public function showAdminLists(Player $player) {
|
||||
$this->adminListShown[$player->login] = true;
|
||||
|
||||
|
@ -7,12 +7,14 @@ use ManiaControl\Commands\CommandListener;
|
||||
use ManiaControl\Players\Player;
|
||||
|
||||
/**
|
||||
* Class offering commands to grant authorizations to players
|
||||
* Class offering Commands to grant Authorizations to Players
|
||||
*
|
||||
* @author steeffeen & kremsy
|
||||
* @copyright ManiaControl Copyright © 2014 ManiaControl Team
|
||||
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
||||
*/
|
||||
class AuthCommands implements CommandListener {
|
||||
/**
|
||||
/*
|
||||
* Private properties
|
||||
*/
|
||||
private $maniaControl = null;
|
||||
|
@ -12,9 +12,11 @@ use ManiaControl\Players\PlayerManager;
|
||||
* Class managing Authentication Levels
|
||||
*
|
||||
* @author steeffeen & kremsy
|
||||
* @copyright ManiaControl Copyright © 2014 ManiaControl Team
|
||||
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
||||
*/
|
||||
class AuthenticationManager implements CallbackListener {
|
||||
/**
|
||||
/*
|
||||
* Constants
|
||||
*/
|
||||
const AUTH_LEVEL_PLAYER = 0;
|
||||
@ -24,12 +26,12 @@ class AuthenticationManager implements CallbackListener {
|
||||
const AUTH_LEVEL_MASTERADMIN = 4;
|
||||
const CB_AUTH_LEVEL_CHANGED = 'AuthenticationManager.AuthLevelChanged';
|
||||
|
||||
/**
|
||||
/*
|
||||
* Public Properties
|
||||
*/
|
||||
public $authCommands = null;
|
||||
|
||||
/**
|
||||
/*
|
||||
* Private Properties
|
||||
*/
|
||||
private $maniaControl = null;
|
||||
|
Reference in New Issue
Block a user