Translate extension for MediaWiki
 
Loading...
Searching...
No Matches
MessageGroupStatsTableFactory.php
1<?php
2declare( strict_types = 1 );
3
4namespace MediaWiki\Extension\Translate\Statistics;
5
6use MediaWiki\Context\IContextSource;
9use MediaWiki\Linker\LinkRenderer;
10
18
19 public function __construct(
20 private readonly ProgressStatsTableFactory $progressStatsTableFactory,
21 private readonly LinkRenderer $linkRenderer,
22 private readonly MessageGroupReviewStore $groupReviewStore,
23 private readonly MessageGroupMetadata $messageGroupMetadata,
24 private readonly bool $haveTranslateWorkflowStates,
25 ) {
26 }
27
28 public function newFromContext( IContextSource $contextSource ): MessageGroupStatsTable {
29 return new MessageGroupStatsTable(
30 $this->progressStatsTableFactory->newFromContext( $contextSource ),
31 $this->linkRenderer,
32 $contextSource,
33 $contextSource->getLanguage(),
34 $this->groupReviewStore,
35 $this->messageGroupMetadata,
36 $this->haveTranslateWorkflowStates
37 );
38 }
39}
Provides methods to get and change the state of a message group.
Offers functionality for reading and updating Translate group related metadata.
Used to build the table displayed on Special:MessageGroupStats.