MediaWiki REL1_39
MediaWiki\Skin\SkinComponentSearch Class Reference

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. More...

Inheritance diagram for MediaWiki\Skin\SkinComponentSearch:
Collaboration diagram for MediaWiki\Skin\SkinComponentSearch:

Public Member Functions

 __construct (Config $config, User $user, MessageLocalizer $localizer, $searchTitle, $relevantTitle)
 
 getTemplateData ()
 This returns all the data that is needed to the component.Returned array must be serialized. This will be passed directly to a template (usually Mustache) for rendering.
Returns
array Data related to component required to render.
Since 1.38:
 

Detailed Description

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. http://www.gnu.org/copyleft/gpl.html

Access: internal
for use inside Skin and SkinTemplate classes only

Definition at line 34 of file SkinComponentSearch.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Skin\SkinComponentSearch::__construct ( Config $config,
User $user,
MessageLocalizer $localizer,
$searchTitle,
$relevantTitle )
Parameters
Config$config
User$user
MessageLocalizer$localizer
Title | null$searchTitle
Title | null$relevantTitle

Definition at line 55 of file SkinComponentSearch.php.

References SpecialPage\newSearchPage().

Member Function Documentation

◆ getTemplateData()

MediaWiki\Skin\SkinComponentSearch::getTemplateData ( )

This returns all the data that is needed to the component.Returned array must be serialized. This will be passed directly to a template (usually Mustache) for rendering.

Returns
array Data related to component required to render.
Since 1.38:

  • string html-button-fulltext-attributes HTML attributes for usage on a button that redirects user to a search page with the current query.
  • string html-button-go-attributes HTML attributes for usage on a search button that redirects user to a title that matches the query.
  • string html-input-attributes HTML attributes for input on an input field that is used to construct a search query. Since 1.35:
  • string form-action Where the form should post to e.g. /w/index.php
  • string html-button-search Search button with label derived from html-button-go-attributes.
  • string html-button-search-fallback Search button with label derived from html-button-fulltext-attributes.
  • string html-input An input element derived from html-input-attributes.

Implements MediaWiki\Skin\SkinComponent.

Definition at line 201 of file SkinComponentSearch.php.


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