changed direct public access of maniacontrol properties to using getter methods

This commit is contained in:
Steffen Schröder
2014-08-03 01:34:18 +02:00
parent e560919096
commit 4d3dc92ad5
64 changed files with 2337 additions and 2055 deletions

View File

@ -45,8 +45,11 @@ class InstallMenu implements ConfiguratorMenu, ManialinkPageAnswerListener {
public function __construct(ManiaControl $maniaControl) {
$this->maniaControl = $maniaControl;
$this->maniaControl->authenticationManager->definePermissionLevel(self::SETTING_PERMISSION_INSTALL_PLUGINS, AuthenticationManager::AUTH_LEVEL_SUPERADMIN);
$this->maniaControl->manialinkManager->registerManialinkPageAnswerListener(self::ACTION_REFRESH_LIST, $this, 'handleRefreshListAction');
// Permissions
$this->maniaControl->getAuthenticationManager()->definePermissionLevel(self::SETTING_PERMISSION_INSTALL_PLUGINS, AuthenticationManager::AUTH_LEVEL_SUPERADMIN);
// Callbacks
$this->maniaControl->getManialinkManager()->registerManialinkPageAnswerListener(self::ACTION_REFRESH_LIST, $this, 'handleRefreshListAction');
}
/**
@ -122,7 +125,7 @@ class InstallMenu implements ConfiguratorMenu, ManialinkPageAnswerListener {
// List plugins
foreach ($pluginList as $plugin) {
if ($this->maniaControl->pluginManager->isPluginIdInstalled($plugin->id)) {
if ($this->maniaControl->getPluginManager()->isPluginIdInstalled($plugin->id)) {
// Already installed -> Skip
continue;
}
@ -270,6 +273,6 @@ class InstallMenu implements ConfiguratorMenu, ManialinkPageAnswerListener {
* @param Player $player
*/
public function handleRefreshListAction(array $actionCallback, Player $player) {
$this->maniaControl->configurator->showMenu($player, $this);
$this->maniaControl->getConfigurator()->showMenu($player, $this);
}
}