MediaWiki
1.34.0
|
Public Member Functions | |
__construct (SpecialSearch $specialSearch, SearchEngineConfig $searchConfig, array $profiles) | |
render ( $profile, $term, $numResults, $totalResults, $offset, $isPowerSearch, array $options=[]) | |
Protected Member Functions | |
makeSearchLink ( $term, $label, $tooltip, array $params=[]) | |
Make a search link with some target namespaces. More... | |
optionsHtml ( $term, $isPowerSearch, $profile) | |
Generates HTML for advanced options available with the currently selected search profile. More... | |
powerSearchBox ( $term, array $opts) | |
profileTabsHtml ( $profile, $term) | |
Generates HTML for the list of available search profiles. More... | |
shortDialogHtml ( $profile, $term, $numResults, $totalResults, $offset, array $options=[]) | |
startsWithImage ( $term) | |
Check if query starts with image: prefix. More... | |
Protected Attributes | |
array | $profiles |
SearchEngineConfig | $searchConfig |
SpecialSearch | $specialSearch |
Definition at line 13 of file SearchFormWidget.php.
MediaWiki\Widget\Search\SearchFormWidget::__construct | ( | SpecialSearch | $specialSearch, |
SearchEngineConfig | $searchConfig, | ||
array | $profiles | ||
) |
SpecialSearch | $specialSearch | |
SearchEngineConfig | $searchConfig | |
array | $profiles |
Definition at line 26 of file SearchFormWidget.php.
References MediaWiki\Widget\Search\SearchFormWidget\$profiles, MediaWiki\Widget\Search\SearchFormWidget\$searchConfig, and MediaWiki\Widget\Search\SearchFormWidget\$specialSearch.
|
protected |
Make a search link with some target namespaces.
string | $term | The term to search for |
string | $label | Link's text |
string | $tooltip | Link's tooltip |
array | $params | Query string parameters |
Definition at line 204 of file SearchFormWidget.php.
References Xml\element().
Referenced by MediaWiki\Widget\Search\SearchFormWidget\profileTabsHtml().
|
protected |
Generates HTML for advanced options available with the currently selected search profile.
string | $term | User provided search term |
bool | $isPowerSearch | Is the advanced search profile enabled? |
string | $profile | The current search profile |
Definition at line 229 of file SearchFormWidget.php.
References MediaWiki\Widget\Search\SearchFormWidget\powerSearchBox(), and Hooks\run().
Referenced by MediaWiki\Widget\Search\SearchFormWidget\render().
|
protected |
string | $term | The current search term |
array | $opts | Additional key/value pairs that will be submitted with the generated form. |
Definition at line 251 of file SearchFormWidget.php.
References Xml\checkLabel(), MediaWiki\MediaWikiServices\getInstance(), and Hooks\run().
Referenced by MediaWiki\Widget\Search\SearchFormWidget\optionsHtml().
|
protected |
Generates HTML for the list of available search profiles.
string | $profile | The currently selected profile |
string | $term | The user provided search terms |
Definition at line 153 of file SearchFormWidget.php.
References $lang, MediaWiki\Widget\Search\SearchFormWidget\makeSearchLink(), MediaWiki\Widget\Search\SearchFormWidget\startsWithImage(), and Xml\tags().
Referenced by MediaWiki\Widget\Search\SearchFormWidget\render().
MediaWiki\Widget\Search\SearchFormWidget::render | ( | $profile, | |
$term, | |||
$numResults, | |||
$totalResults, | |||
$offset, | |||
$isPowerSearch, | |||
array | $options = [] |
||
) |
string | $profile | The current search profile |
string | $term | The current search term |
int | $numResults | The number of results shown |
int | $totalResults | The total estimated results found |
int | $offset | Current offset in search results |
bool | $isPowerSearch | Is the 'advanced' section open? |
array | $options | Widget options |
Definition at line 46 of file SearchFormWidget.php.
References Xml\openElement(), MediaWiki\Widget\Search\SearchFormWidget\optionsHtml(), MediaWiki\Widget\Search\SearchFormWidget\profileTabsHtml(), MediaWiki\Widget\Search\SearchFormWidget\shortDialogHtml(), and wfScript().
|
protected |
string | $profile | The current search profile |
string | $term | The current search term |
int | $numResults | The number of results shown |
int | $totalResults | The total estimated results found |
int | $offset | Current offset in search results |
array | $options | Widget options |
Definition at line 89 of file SearchFormWidget.php.
References Xml\tags().
Referenced by MediaWiki\Widget\Search\SearchFormWidget\render().
|
protected |
Check if query starts with image: prefix.
string | $term | The string to check |
Definition at line 187 of file SearchFormWidget.php.
References MediaWiki\MediaWikiServices\getInstance(), and NS_FILE.
Referenced by MediaWiki\Widget\Search\SearchFormWidget\profileTabsHtml().
|
protected |
Definition at line 19 of file SearchFormWidget.php.
Referenced by MediaWiki\Widget\Search\SearchFormWidget\__construct().
|
protected |
Definition at line 17 of file SearchFormWidget.php.
Referenced by MediaWiki\Widget\Search\SearchFormWidget\__construct().
|
protected |
Definition at line 15 of file SearchFormWidget.php.
Referenced by MediaWiki\Widget\Search\SearchFormWidget\__construct().