|
| | __construct (private readonly LexemeMerger $lexemeMerger, private readonly SummaryFormatter $summaryFormatter, private readonly MediaWikiLexemeRedirector $lexemeRedirector, private readonly EntityPermissionChecker $permissionChecker, private readonly PermissionManager $permissionManager, private readonly EntityTitleStoreLookup $entityTitleLookup, private readonly WatchedItemStoreInterface $watchedItemStore, private readonly EntityRevisionLookup $entityRevisionLookup, private readonly MediaWikiEditEntityFactory $editEntityFactory, private readonly FormatterFactory $formatterFactory,) |
| |
| | mergeLexemes (LexemeId $sourceId, LexemeId $targetId, IContextSource $context, ?string $summary=null, bool $botEditRequested=false, array $tags=[]) |
| |
|
| | checkCanMerge (LexemeId $lexemeId, IContextSource $context) |
| |
| | getLexeme (LexemeId $lexemeId) |
| |
| | validateEntities (EntityDocument $fromEntity, EntityDocument $toEntity) |
| |
| | getSummary (string $direction, Lexeme $lexeme, ?string $customSummary=null) |
| |
| | attemptSaveMerge (Lexeme $source, Lexeme $target, IContextSource $context, ?string $summary, bool $botEditRequested, array $tags) |
| |
| | saveLexeme (Lexeme $lexeme, IContextSource $context, FormatableSummary $summary, bool $botEditRequested, array $tags) |
| |
| | updateWatchlistEntries (LexemeId $fromId, LexemeId $toId) |
| |
- Copyright
- GPL-2.0-or-later
◆ __construct()
| Wikibase\Lexeme\Interactors\MergeLexemes\MergeLexemesInteractor::__construct |
( |
private readonly LexemeMerger | $lexemeMerger, |
|
|
private readonly SummaryFormatter | $summaryFormatter, |
|
|
private readonly MediaWikiLexemeRedirector | $lexemeRedirector, |
|
|
private readonly EntityPermissionChecker | $permissionChecker, |
|
|
private readonly PermissionManager | $permissionManager, |
|
|
private readonly EntityTitleStoreLookup | $entityTitleLookup, |
|
|
private readonly WatchedItemStoreInterface | $watchedItemStore, |
|
|
private readonly EntityRevisionLookup | $entityRevisionLookup, |
|
|
private readonly MediaWikiEditEntityFactory | $editEntityFactory, |
|
|
private readonly FormatterFactory | $formatterFactory ) |
◆ attemptSaveMerge()
| Wikibase\Lexeme\Interactors\MergeLexemes\MergeLexemesInteractor::attemptSaveMerge |
( |
Lexeme | $source, |
|
|
Lexeme | $target, |
|
|
IContextSource | $context, |
|
|
?string | $summary, |
|
|
bool | $botEditRequested, |
|
|
array | $tags ) |
|
private |
◆ checkCanMerge()
| Wikibase\Lexeme\Interactors\MergeLexemes\MergeLexemesInteractor::checkCanMerge |
( |
LexemeId | $lexemeId, |
|
|
IContextSource | $context ) |
|
private |
◆ getLexeme()
| Wikibase\Lexeme\Interactors\MergeLexemes\MergeLexemesInteractor::getLexeme |
( |
LexemeId | $lexemeId | ) |
|
|
private |
◆ getSummary()
| Wikibase\Lexeme\Interactors\MergeLexemes\MergeLexemesInteractor::getSummary |
( |
string | $direction, |
|
|
Lexeme | $lexeme, |
|
|
?string | $customSummary = null ) |
|
private |
- Parameters
-
| string | $direction | either 'from' or 'to' |
| Lexeme | $lexeme | |
| string | null | $customSummary | |
- Returns
- Summary
◆ mergeLexemes()
| Wikibase\Lexeme\Interactors\MergeLexemes\MergeLexemesInteractor::mergeLexemes |
( |
LexemeId | $sourceId, |
|
|
LexemeId | $targetId, |
|
|
IContextSource | $context, |
|
|
?string | $summary = null, |
|
|
bool | $botEditRequested = false, |
|
|
array | $tags = [] ) |
- Parameters
-
| LexemeId | $sourceId | |
| LexemeId | $targetId | |
| IContextSource | $context | |
| string | null | $summary | - only relevant when called through the API |
| bool | $botEditRequested | |
| string[] | $tags | |
- Returns
- MergeLexemesStatus Note that the status is only returned to wrap the context and saved temp user in a strongly typed container. Errors are (currently) reported as exceptions, not as a failed status. (It would be nice to fix this at some point and use status consistently.)
- Exceptions
-
◆ saveLexeme()
| Wikibase\Lexeme\Interactors\MergeLexemes\MergeLexemesInteractor::saveLexeme |
( |
Lexeme | $lexeme, |
|
|
IContextSource | $context, |
|
|
FormatableSummary | $summary, |
|
|
bool | $botEditRequested, |
|
|
array | $tags ) |
|
private |
◆ updateWatchlistEntries()
| Wikibase\Lexeme\Interactors\MergeLexemes\MergeLexemesInteractor::updateWatchlistEntries |
( |
LexemeId | $fromId, |
|
|
LexemeId | $toId ) |
|
private |
◆ validateEntities()
| Wikibase\Lexeme\Interactors\MergeLexemes\MergeLexemesInteractor::validateEntities |
( |
EntityDocument | $fromEntity, |
|
|
EntityDocument | $toEntity ) |
|
private |
- Exceptions
-
| ReferenceSameLexemeException | |
The documentation for this class was generated from the following file: