MediaWiki master
|
Provides the intro messages (edit notices and others) to be displayed before an edit form. More...
Public Member Functions | |
__construct (Config $config, LinkRenderer $linkRenderer, PermissionManager $permManager, UserNameUtils $userNameUtils, TempUserCreator $tempUserCreator, UserFactory $userFactory, RestrictionStore $restrictionStore, DatabaseBlockStore $blockStore, ReadOnlyMode $readOnlyMode, SpecialPageFactory $specialPageFactory, RepoGroup $repoGroup, NamespaceInfo $namespaceInfo, SkinFactory $skinFactory, IConnectionProvider $dbProvider, 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 41 of file IntroMessageBuilder.php.
MediaWiki\EditPage\IntroMessageBuilder::__construct | ( | Config | $config, |
LinkRenderer | $linkRenderer, | ||
PermissionManager | $permManager, | ||
UserNameUtils | $userNameUtils, | ||
TempUserCreator | $tempUserCreator, | ||
UserFactory | $userFactory, | ||
RestrictionStore | $restrictionStore, | ||
DatabaseBlockStore | $blockStore, | ||
ReadOnlyMode | $readOnlyMode, | ||
SpecialPageFactory | $specialPageFactory, | ||
RepoGroup | $repoGroup, | ||
NamespaceInfo | $namespaceInfo, | ||
SkinFactory | $skinFactory, | ||
IConnectionProvider | $dbProvider, | ||
UrlUtils | $urlUtils ) |
Definition at line 65 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 141 of file IntroMessageBuilder.php.
const MediaWiki\EditPage\IntroMessageBuilder::LESS_FRAMES = 2 |
Definition at line 47 of file IntroMessageBuilder.php.
Referenced by MediaWiki\EditPage\IntroMessageList\__construct().
const MediaWiki\EditPage\IntroMessageBuilder::MORE_FRAMES = 1 |
Definition at line 46 of file IntroMessageBuilder.php.
Referenced by MediaWiki\EditPage\IntroMessageList\__construct().