MediaWiki master
NamespacesMultiselectWidget.php
Go to the documentation of this file.
1<?php
2
3namespace MediaWiki\Widget;
4
12
13 protected $allowEditTags = null;
14
19 public function __construct( array $config = [] ) {
20 parent::__construct( $config );
21
22 if ( isset( $config['allowEditTags'] ) ) {
23 $this->allowEditTags = $config['allowEditTags'];
24 }
25
26 $this->addClasses( [ 'mw-widgets-namespacesMultiselectWidget' ] );
27 }
28
29 protected function getJavaScriptClassName() {
30 return 'mw.widgets.NamespacesMultiselectWidget';
31 }
32
33 public function getConfig( &$config ) {
34 if ( $this->allowEditTags !== null ) {
35 $config['allowEditTags'] = $this->allowEditTags;
36 }
37
38 return parent::getConfig( $config );
39 }
40
41}
Base class for widgets to select multiple users, titles, namespaces, etc.