|
MediaWiki master
|
Provides the intro messages (edit notices and others) to be displayed before an edit form. More...
Public Member Functions | |
| __construct (private readonly Config $config, private readonly LinkRenderer $linkRenderer, private readonly PermissionManager $permManager, private readonly UserNameUtils $userNameUtils, private readonly TempUserCreator $tempUserCreator, private readonly UserFactory $userFactory, private readonly RestrictionStore $restrictionStore, private readonly DatabaseBlockStore $blockStore, private readonly ReadOnlyMode $readOnlyMode, private readonly SpecialPageFactory $specialPageFactory, private readonly RepoGroup $repoGroup, private readonly NamespaceInfo $namespaceInfo, private readonly SkinFactory $skinFactory, private readonly IConnectionProvider $dbProvider, private readonly UrlUtils $urlUtils) | |
| getIntroMessages (int $frames, array $skip, MessageLocalizer $localizer, ProperPageIdentity $page, ?RevisionRecord $revRecord, Authority $performer, ?string $editIntro, ?string $returnToQuery, bool $preview, ?string $section=null) | |
| Return intro messages to be shown before an edit form. | |
Public Attributes | |
| const | LESS_FRAMES = 2 |
| const | MORE_FRAMES = 1 |
Provides the intro messages (edit notices and others) to be displayed before an edit form.
Used by EditPage, and may be used by extensions providing alternative editors.
Definition at line 42 of file IntroMessageBuilder.php.
| MediaWiki\EditPage\IntroMessageBuilder::__construct | ( | private readonly Config | $config, |
| private readonly LinkRenderer | $linkRenderer, | ||
| private readonly PermissionManager | $permManager, | ||
| private readonly UserNameUtils | $userNameUtils, | ||
| private readonly TempUserCreator | $tempUserCreator, | ||
| private readonly UserFactory | $userFactory, | ||
| private readonly RestrictionStore | $restrictionStore, | ||
| private readonly DatabaseBlockStore | $blockStore, | ||
| private readonly ReadOnlyMode | $readOnlyMode, | ||
| private readonly SpecialPageFactory | $specialPageFactory, | ||
| private readonly RepoGroup | $repoGroup, | ||
| private readonly NamespaceInfo | $namespaceInfo, | ||
| private readonly SkinFactory | $skinFactory, | ||
| private readonly IConnectionProvider | $dbProvider, | ||
| private readonly UrlUtils | $urlUtils ) |
Definition at line 50 of file IntroMessageBuilder.php.
| MediaWiki\EditPage\IntroMessageBuilder::getIntroMessages | ( | int | $frames, |
| array | $skip, | ||
| MessageLocalizer | $localizer, | ||
| ProperPageIdentity | $page, | ||
| ?RevisionRecord | $revRecord, | ||
| Authority | $performer, | ||
| ?string | $editIntro, | ||
| ?string | $returnToQuery, | ||
| bool | $preview, | ||
| ?string | $section = null ) |
Return intro messages to be shown before an edit form.
The message identifiers used as array keys are stable. Callers of this method may recognize specific messages and omit them when displaying, if they're not applicable to some interface or if they provide the same information in an alternative way.
Callers should load the 'mediawiki.interface.helpers.styles' ResourceLoader module, as some of the possible messages rely on those styles.
| int | $frames | Some intro messages come with optional wrapper frames. Pass IntroMessageBuilder::MORE_FRAMES to include the frames whenever possible, or IntroMessageBuilder::LESS_FRAMES to omit them whenever possible. |
| string[] | $skip | Identifiers of messages not to generate |
| MessageLocalizer | $localizer | |
| ProperPageIdentity | $page | Page being viewed |
| RevisionRecord | null | $revRecord | Revision being viewed, null if page doesn't exist |
| Authority | $performer | |
| string | null | $editIntro | |
| string | null | $returnToQuery | |
| bool | $preview | |
| string | null | $section |
Definition at line 111 of file IntroMessageBuilder.php.
| const MediaWiki\EditPage\IntroMessageBuilder::LESS_FRAMES = 2 |
Definition at line 48 of file IntroMessageBuilder.php.
Referenced by MediaWiki\EditPage\IntroMessageList\__construct().
| const MediaWiki\EditPage\IntroMessageBuilder::MORE_FRAMES = 1 |
Definition at line 47 of file IntroMessageBuilder.php.
Referenced by MediaWiki\EditPage\IntroMessageList\__construct().