diff options
Diffstat (limited to 'CheckUser/src/PreliminaryCheckPagerFactory.php')
-rw-r--r-- | CheckUser/src/PreliminaryCheckPagerFactory.php | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/CheckUser/src/PreliminaryCheckPagerFactory.php b/CheckUser/src/PreliminaryCheckPagerFactory.php new file mode 100644 index 00000000..aaee655e --- /dev/null +++ b/CheckUser/src/PreliminaryCheckPagerFactory.php @@ -0,0 +1,57 @@ +<?php + +namespace MediaWiki\CheckUser; + +use MediaWiki\Linker\LinkRenderer; + +class PreliminaryCheckPagerFactory implements PagerFactory { + /** @var LinkRenderer */ + private $linkRenderer; + + /** @var \NamespaceInfo */ + private $namespaceInfo; + + /** @var \ExtensionRegistry */ + private $extensionRegistry; + + /** @var TokenQueryManager */ + private $tokenQueryManager; + + /** @var PreliminaryCheckService */ + private $preliminaryCheck; + + /** + * @param LinkRenderer $linkRenderer + * @param \NamespaceInfo $namespaceInfo + * @param \ExtensionRegistry $extensionRegistry + * @param TokenQueryManager $tokenQueryManager + * @param PreliminaryCheckService $preliminaryCheck + */ + public function __construct( + LinkRenderer $linkRenderer, + \NamespaceInfo $namespaceInfo, + \ExtensionRegistry $extensionRegistry, + TokenQueryManager $tokenQueryManager, + PreliminaryCheckService $preliminaryCheck + ) { + $this->linkRenderer = $linkRenderer; + $this->namespaceInfo = $namespaceInfo; + $this->extensionRegistry = $extensionRegistry; + $this->tokenQueryManager = $tokenQueryManager; + $this->preliminaryCheck = $preliminaryCheck; + } + + /** + * @inheritDoc + */ + public function createPager( \IContextSource $context ) : PreliminaryCheckPager { + return new PreliminaryCheckPager( + $context, + $this->linkRenderer, + $this->namespaceInfo, + $this->tokenQueryManager, + $this->extensionRegistry, + $this->preliminaryCheck + ); + } +} |