MediaWiki  master
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 
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 }
MediaWiki\Widget\TitlesMultiselectWidget\getJavaScriptClassName
getJavaScriptClassName()
Definition: TitlesMultiselectWidget.php:36
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:22
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:42
MediaWiki\Widget\TitlesMultiselectWidget\$showMissing
$showMissing
Definition: TitlesMultiselectWidget.php:13
MediaWiki\Widget\TitlesMultiselectWidget\getConfig
getConfig(&$config)
Definition: TitlesMultiselectWidget.php:40