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