mirror of
https://github.com/StarCitizenTools/mediawiki-skins-Citizen.git
synced 2024-11-28 08:10:45 +00:00
03da361b97
- Refactor existing template data-related partials into CitizenComponent components - Re-implement user menu header as UserInfo - Add description text for anon and temp user in UserMenu --------- Co-authored-by: github-actions <github-actions@users.noreply.github.com>
42 lines
735 B
PHP
42 lines
735 B
PHP
<?php
|
|
|
|
declare( strict_types=1 );
|
|
|
|
namespace MediaWiki\Skins\Citizen\Components;
|
|
|
|
use Skin;
|
|
|
|
/**
|
|
* CitizenComponentSearchBox component
|
|
*/
|
|
class CitizenComponentSearchBox implements CitizenComponent {
|
|
/** @var array */
|
|
private $searchBoxData;
|
|
|
|
/** @var Skin */
|
|
private $skin;
|
|
|
|
/**
|
|
* @param array $searchBoxData
|
|
*/
|
|
public function __construct(
|
|
array $searchBoxData,
|
|
Skin $skin
|
|
) {
|
|
$this->searchBoxData = $searchBoxData;
|
|
$this->skin = $skin;
|
|
}
|
|
|
|
/**
|
|
* @inheritDoc
|
|
*/
|
|
public function getTemplateData(): array {
|
|
$searchBoxData = $this->searchBoxData;
|
|
|
|
return $searchBoxData += [
|
|
'msg-citizen-search-toggle-shortcut' => '[/]',
|
|
'html-random-href' => $this->skin->makeSpecialUrl( 'Randompage' ),
|
|
];
|
|
}
|
|
}
|