|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
|
|
4
|
|
|
namespace eXpansion\Bundle\Maps\ChatCommand; |
|
5
|
|
|
|
|
6
|
|
|
use eXpansion\Bundle\Maps\Plugins\Gui\ManiaExchangeWindowFactory; |
|
7
|
|
|
use eXpansion\Bundle\Maps\Plugins\Gui\MapsWindowFactory; |
|
8
|
|
|
use eXpansion\Bundle\Maps\Plugins\ManiaExchange; |
|
9
|
|
|
use eXpansion\Bundle\Maps\Plugins\Maps; |
|
10
|
|
|
use eXpansion\Framework\AdminGroups\Helpers\AdminGroups; |
|
11
|
|
|
use eXpansion\Framework\Core\Model\ChatCommand\AbstractChatCommand; |
|
12
|
|
|
use Symfony\Component\Console\Input\InputInterface; |
|
13
|
|
|
use Tests\eXpansion\Framework\AdminGroups\TestHelpers\AdminChatCommand; |
|
14
|
|
|
|
|
15
|
|
|
|
|
16
|
|
|
/** |
|
17
|
|
|
* Class Records |
|
18
|
|
|
* |
|
19
|
|
|
* @package eXpansion\Bundle\LocalRecords\ChatCommand; |
|
20
|
|
|
* @author reaby |
|
21
|
|
|
*/ |
|
22
|
|
|
class MxSearch extends AdminChatCommand |
|
23
|
|
|
{ |
|
24
|
|
|
/** @var ManiaExchangeWindowFactory */ |
|
25
|
|
|
protected $maniaExchangeWindowFactory; |
|
26
|
|
|
/** |
|
27
|
|
|
* @var ManiaExchangeWindowFactory |
|
28
|
|
|
*/ |
|
29
|
|
|
private $exchangeWindowFactory; |
|
30
|
|
|
|
|
31
|
|
|
/** |
|
32
|
|
|
* MxSearch constructor. |
|
33
|
|
|
* @param $command |
|
34
|
|
|
* @param string $permission |
|
35
|
|
|
* @param array $aliases |
|
36
|
|
|
* @param AdminGroups $adminGroupsHelper |
|
37
|
|
|
* @param ManiaExchangeWindowFactory $exchangeWindowFactory |
|
38
|
|
|
*/ |
|
39
|
|
|
public function __construct( |
|
40
|
|
|
$command, |
|
41
|
|
|
$permission, |
|
42
|
|
|
$aliases = [], |
|
43
|
|
|
AdminGroups $adminGroupsHelper, |
|
44
|
|
|
ManiaExchangeWindowFactory $exchangeWindowFactory |
|
45
|
|
|
) { |
|
46
|
|
|
parent::__construct($command, $permission, $aliases, $adminGroupsHelper); |
|
47
|
|
|
|
|
48
|
|
|
$this->exchangeWindowFactory = $exchangeWindowFactory; |
|
49
|
|
|
} |
|
50
|
|
|
|
|
51
|
|
|
/** |
|
52
|
|
|
* @inheritdoc |
|
53
|
|
|
*/ |
|
54
|
|
|
public function execute($login, InputInterface $input) |
|
55
|
|
|
{ |
|
56
|
|
|
$this->exchangeWindowFactory->create($login); |
|
57
|
|
|
} |
|
58
|
|
|
} |
|
59
|
|
|
|