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