MediaWiki
1.30.0
|
Public Member Functions | |
__construct (SpecialSearch $specialSearch, SearchEngineConfig $searchConfig, array $profiles) | |
render ( $profile, $term, $numResults, $totalResults, $offset, $isPowerSearch) | |
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) | |
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 186 of file SearchFormWidget.php.
References $params, $term, and 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 211 of file SearchFormWidget.php.
References $html, $term, 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 233 of file SearchFormWidget.php.
References $name, $rows, $term, $user, $value, $wgContLang, as, Xml\checkLabel(), MWNamespace\getSubject(), global, Html\hidden(), 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 133 of file SearchFormWidget.php.
References $lang, $term, as, 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 | |||
) |
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? |
Definition at line 45 of file SearchFormWidget.php.
References $term, 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 |
Definition at line 81 of file SearchFormWidget.php.
References $html, $term, Html\hidden(), and 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 168 of file SearchFormWidget.php.
References $term, $wgContLang, captcha-old\count, global, 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().