3 * MediaWiki Widgets – SearchInputWidget class.
5 * @copyright 2011-2015 MediaWiki Widgets Team and others; see AUTHORS.txt
6 * @license The MIT License (MIT); see LICENSE.txt
8 namespace MediaWiki\Widget
;
11 * Search input widget.
13 class SearchInputWidget
extends TitleInputWidget
{
15 protected $pushPending = false;
16 protected $validateTitle = false;
17 protected $highlightFirst = false;
20 * @param array $config Configuration options
21 * @param int|null $config['pushPending'] Whether the input should be visually marked as
22 * "pending", while requesting suggestions (default: true)
24 public function __construct( array $config = [] ) {
35 // Properties, which are ignored in PHP and just shipped back to JS
36 if ( isset( $config['pushPending'] ) ) {
37 $this->pushPending
= $config['pushPending'];
41 $this->addClasses( [ 'mw-widget-searchInputWidget' ] );
44 protected function getJavaScriptClassName() {
45 return 'mw.widgets.SearchInputWidget';
48 public function getConfig( &$config ) {
49 $config['pushPending'] = $this->pushPending
;
50 return parent
::getConfig( $config );