MediaWiki REL1_35
TitlesMultiselectWidget.php
Go to the documentation of this file.
1<?php
2
3namespace MediaWiki\Widget;
4
12
13 protected $showMissing = null;
14 protected $excludeDynamicNamespaces = null;
15
22 public function __construct( array $config = [] ) {
23 parent::__construct( $config );
24
25 // Properties
26 if ( isset( $config['showMissing'] ) ) {
27 $this->showMissing = $config['showMissing'];
28 }
29 if ( isset( $config['excludeDynamicNamespaces'] ) ) {
30 $this->excludeDynamicNamespaces = $config['excludeDynamicNamespaces'];
31 }
32
33 $this->addClasses( [ 'mw-widgets-titlesMultiselectWidget' ] );
34 }
35
36 protected function getJavaScriptClassName() {
37 return 'mw.widgets.TitlesMultiselectWidget';
38 }
39
40 public function getConfig( &$config ) {
41 if ( $this->showMissing !== null ) {
42 $config['showMissing'] = $this->showMissing;
43 }
44 if ( $this->excludeDynamicNamespaces !== null ) {
45 $config['excludeDynamicNamespaces'] = $this->excludeDynamicNamespaces;
46 }
47
48 return parent::getConfig( $config );
49 }
50
51}
Abstract base class for widgets to select multiple users, titles, namespaces, etc.