Файловый менеджер - Редактировать - /var/www/html/mediawiki-1.43.1/extensions/FileImporter/src/Html/HelpBanner.php
Ðазад
<?php namespace FileImporter\Html; use FileImporter\FileImporterUtils; use MediaWiki\Html\Html; use MediaWiki\MediaWikiServices; use MediaWiki\User\Options\UserOptionsLookup; use OOUI\HtmlSnippet; use OOUI\IconWidget; use OOUI\MessageWidget; /** * @license GPL-2.0-or-later * @author Andrew Kostka <andrew.kostka@wikimedia.de> */ class HelpBanner extends SpecialPageHtmlFragment { public const HIDE_HELP_BANNER_PREFERENCE = 'userjs-fileimporter-hide-help-banner'; public const HIDE_HELP_BANNER_CHECK_BOX = 'mw-importfile-disable-help-banner'; /** * @return bool */ private function shouldHelpBannerBeShown() { // TODO: Inject /** @var UserOptionsLookup $userOptionsLookup */ $userOptionsLookup = MediaWikiServices::getInstance()->getService( 'UserOptionsLookup' ); return !$userOptionsLookup->getBoolOption( $this->getUser(), self::HIDE_HELP_BANNER_PREFERENCE ); } public function getHtml(): string { if ( !$this->shouldHelpBannerBeShown() ) { return ''; } $textSection = Html::rawElement( 'div', [ 'class' => 'mw-importfile-help-banner-text' ], FileImporterUtils::addTargetBlankToLinks( $this->msg( 'fileimporter-help-banner-text' )->parse() ) ); $imageSection = Html::element( 'div', [ 'class' => 'mw-importfile-image-help-banner' ], '' ); $closeSection = Html::rawElement( 'label', [ 'for' => self::HIDE_HELP_BANNER_CHECK_BOX ], new IconWidget( [ 'icon' => 'close', 'title' => $this->msg( 'fileimporter-help-banner-close-tooltip' )->text() ] ) ); return Html::rawElement( 'div', [ 'class' => 'mw-importfile-help-banner' ], Html::check( 'mw-importfile-disable-help-banner', false, [ 'id' => self::HIDE_HELP_BANNER_CHECK_BOX ] ) . new MessageWidget( [ 'label' => new HtmlSnippet( $textSection . $imageSection . $closeSection ) ] ) ); } }
| ver. 1.1 | |
.
| PHP 8.4.18 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка