MediaWiki  1.32.5
MediaWiki\Widget\SearchInputWidget Class Reference

Search input widget. More...

Inheritance diagram for MediaWiki\Widget\SearchInputWidget:
Collaboration diagram for MediaWiki\Widget\SearchInputWidget:

Public Member Functions

 __construct (array $config=[])
 
 getConfig (&$config)
 

Protected Member Functions

 getInputElement ( $config)
 
 getJavaScriptClassName ()
 

Protected Attributes

 $dataLocation = 'header'
 
 $highlightFirst = false
 
 $performSearchOnClick = true
 
 $pushPending = false
 
 $validateTitle = false
 
- Protected Attributes inherited from MediaWiki\Widget\TitleInputWidget
 $highlightFirst = null
 
 $namespace = null
 
 $relative = null
 
 $suggestions = null
 
 $validateTitle = null
 

Detailed Description

Search input widget.

Note
2011-2015 MediaWiki Widgets Team and others; see AUTHORS.txt
MIT

Definition at line 11 of file SearchInputWidget.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Widget\SearchInputWidget::__construct ( array  $config = [])
Parameters
array$configConfiguration options
  • int|null $config['pushPending'] Whether the input should be visually marked as "pending", while requesting suggestions (default: false)
  • bool|null $config['performSearchOnClick'] If true, the script will start a search whenever a user hits a suggestion. If false, the text of the suggestion is inserted into the text field only (default: true)
  • string $config['dataLocation'] Where the search input field will be used (header or content, default: header)

Reimplemented from MediaWiki\Widget\TitleInputWidget.

Definition at line 29 of file SearchInputWidget.php.

References MediaWiki\$config.

Member Function Documentation

◆ getConfig()

◆ getInputElement()

MediaWiki\Widget\SearchInputWidget::getInputElement (   $config)
protected

Definition at line 55 of file SearchInputWidget.php.

◆ getJavaScriptClassName()

MediaWiki\Widget\SearchInputWidget::getJavaScriptClassName ( )
protected

Reimplemented from MediaWiki\Widget\TitleInputWidget.

Definition at line 59 of file SearchInputWidget.php.

Member Data Documentation

◆ $dataLocation

MediaWiki\Widget\SearchInputWidget::$dataLocation = 'header'
protected

Definition at line 17 of file SearchInputWidget.php.

Referenced by MediaWiki\Widget\SearchInputWidget\getConfig().

◆ $highlightFirst

MediaWiki\Widget\SearchInputWidget::$highlightFirst = false
protected

Definition at line 16 of file SearchInputWidget.php.

◆ $performSearchOnClick

MediaWiki\Widget\SearchInputWidget::$performSearchOnClick = true
protected

Definition at line 14 of file SearchInputWidget.php.

Referenced by MediaWiki\Widget\SearchInputWidget\getConfig().

◆ $pushPending

MediaWiki\Widget\SearchInputWidget::$pushPending = false
protected

Definition at line 13 of file SearchInputWidget.php.

Referenced by MediaWiki\Widget\SearchInputWidget\getConfig().

◆ $validateTitle

MediaWiki\Widget\SearchInputWidget::$validateTitle = false
protected

Definition at line 15 of file SearchInputWidget.php.


The documentation for this class was generated from the following file: