MediaWiki
1.33.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 14 of file SearchFormWidget.php.
MediaWiki\Widget\Search\SearchFormWidget::__construct | ( | SpecialSearch | $specialSearch, |
SearchEngineConfig | $searchConfig, | ||
array | $profiles | ||
) |
SpecialSearch | $specialSearch | |
SearchEngineConfig | $searchConfig | |
array | $profiles |
Definition at line 27 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 191 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 216 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 238 of file SearchFormWidget.php.
References $name, $rows, $term, $user, $value, as, Xml\checkLabel(), MWNamespace\getSubject(), 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 140 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 46 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 84 of file SearchFormWidget.php.
References $html, $term, 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 174 of file SearchFormWidget.php.
References $term, captcha-old\count, MediaWiki\MediaWikiServices\getInstance(), and NS_FILE.
Referenced by MediaWiki\Widget\Search\SearchFormWidget\profileTabsHtml().
|
protected |
Definition at line 20 of file SearchFormWidget.php.
Referenced by MediaWiki\Widget\Search\SearchFormWidget\__construct().
|
protected |
Definition at line 18 of file SearchFormWidget.php.
Referenced by MediaWiki\Widget\Search\SearchFormWidget\__construct().
|
protected |
Definition at line 16 of file SearchFormWidget.php.
Referenced by MediaWiki\Widget\Search\SearchFormWidget\__construct().