wiki.techinc.nl/includes/deferred/LinksUpdate/TemplateLinksTable.php
Umherirrender 420e071271 Remove TemplateLinksSchemaMigrationStage config
Bug: T299417
Follow-Up: I906e069a63d1dae14924c72318b22b16244371d6
Change-Id: Ia5f730af82f904bd42552e6c6a5c4dadf2454d3a
2024-05-15 22:27:44 +02:00

51 lines
1.1 KiB
PHP

<?php
namespace MediaWiki\Deferred\LinksUpdate;
use LogicException;
use MediaWiki\Parser\ParserOutput;
/**
* templatelinks
*
* @since 1.38
*/
class TemplateLinksTable extends GenericPageLinksTable {
public function setParserOutput( ParserOutput $parserOutput ) {
$this->newLinks = $parserOutput->getTemplates();
}
protected function getTableName() {
return 'templatelinks';
}
protected function getFromField() {
return 'tl_from';
}
protected function getNamespaceField() {
// @phan-suppress-previous-line PhanPluginNeverReturnMethod
throw new LogicException( 'not supported' );
}
protected function getTitleField() {
// @phan-suppress-previous-line PhanPluginNeverReturnMethod
throw new LogicException( 'not supported' );
}
protected function getFromNamespaceField() {
return 'tl_from_namespace';
}
protected function getTargetIdField() {
return 'tl_target_id';
}
/**
* Normalization stage of the links table (see T222224)
* @return int
*/
protected function linksTargetNormalizationStage(): int {
return MIGRATION_NEW;
}
}