Translate extension for MediaWiki
 
Loading...
Searching...
No Matches
LanguagesMultiselectWidget.php
1<?php
2declare( strict_types = 1 );
3
4namespace MediaWiki\Extension\Translate\Utilities;
5
6use MediaWiki\Widget\TagMultiselectWidget;
7
15class LanguagesMultiselectWidget extends TagMultiselectWidget {
17 private $languages;
18
19 public function __construct( array $config = [] ) {
20 parent::__construct( $config );
21 $this->languages = $config['languages'];
22 }
23
24 protected function getJavaScriptClassName() {
25 return 'LanguagesMultiselectWidget';
26 }
27
28 public function getConfig( &$config ) {
29 $config['languages'] = $this->languages;
30
31 return parent::getConfig( $config );
32 }
33}