1 | <?php |
||
25 | class AdminCommand extends AbstractConnectionCommand |
||
26 | { |
||
27 | /** |
||
28 | * Description of the command. |
||
29 | * |
||
30 | * @var string |
||
31 | */ |
||
32 | protected $description; |
||
33 | |||
34 | /** |
||
35 | * Message to display in chat. |
||
36 | * |
||
37 | * @var string |
||
38 | */ |
||
39 | protected $chatMessage; |
||
40 | |||
41 | /** |
||
42 | * Name of the dedicated function to call. |
||
43 | * |
||
44 | * @var string |
||
45 | */ |
||
46 | protected $functionName; |
||
47 | |||
48 | /** |
||
49 | * AdminCommand constructor. |
||
50 | * |
||
51 | * @param $command |
||
52 | * @param $permission |
||
53 | * @param array $aliases |
||
54 | * @param $functionName |
||
55 | * @param AdminGroups $adminGroupsHelper |
||
56 | * @param Factory $factory |
||
57 | * @param ChatNotification $chatNotification |
||
58 | * @param PlayerStorage $playerStorage |
||
59 | * @param LoggerInterface $logger |
||
60 | * @param Time $timeHelper |
||
61 | */ |
||
62 | 3 | public function __construct( |
|
63 | $command, |
||
64 | $permission, |
||
65 | array $aliases = [], |
||
66 | $functionName, |
||
67 | AdminGroups $adminGroupsHelper, |
||
68 | Factory $factory, |
||
69 | ChatNotification $chatNotification, |
||
70 | PlayerStorage $playerStorage, |
||
71 | LoggerInterface $logger, |
||
72 | Time $timeHelper |
||
73 | ) { |
||
74 | 3 | parent::__construct( |
|
75 | 3 | $command, |
|
76 | $permission, |
||
77 | $aliases, |
||
78 | $adminGroupsHelper, |
||
79 | $factory, |
||
80 | $chatNotification, |
||
81 | $playerStorage, |
||
82 | $logger, |
||
83 | $timeHelper |
||
84 | ); |
||
85 | |||
86 | 3 | $this->description = 'expansion_admin_chat.'.strtolower($functionName).'.description'; |
|
87 | 3 | $this->chatMessage = 'expansion_admin_chat.'.strtolower($functionName).'.msg'; |
|
88 | 3 | $this->functionName = $functionName; |
|
89 | 3 | } |
|
90 | |||
91 | /** |
||
92 | * @inheritdoc |
||
93 | */ |
||
94 | 1 | public function execute($login, InputInterface $input) |
|
117 | } |
||
118 |