3 namespace MediaWiki\Widget
;
6 * Widget to select multiple titles.
8 * @copyright 2017 MediaWiki Widgets Team and others; see AUTHORS.txt
11 class TitlesMultiselectWidget
extends TagMultiselectWidget
{
13 protected $showMissing = null;
16 * @param array $config Configuration options
17 * - bool $config['showMissing'] Show missing pages
19 public function __construct( array $config = [] ) {
20 parent
::__construct( $config );
23 if ( isset( $config['showMissing'] ) ) {
24 $this->showMissing
= $config['showMissing'];
27 $this->addClasses( [ 'mw-widgets-titlesMultiselectWidget' ] );
30 protected function getJavaScriptClassName() {
31 return 'mw.widgets.TitlesMultiselectWidget';
34 public function getConfig( &$config ) {
35 if ( $this->showMissing
!== null ) {
36 $config['showMissing'] = $this->showMissing
;
39 return parent
::getConfig( $config );