changed direct public access of maniacontrol properties to using getter methods
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user