Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
1 | <?php |
2 | |
3 | namespace ContentTranslation; |
4 | |
5 | use MediaWiki\Title\Title; |
6 | use User; |
7 | |
8 | interface SectionTranslationBeforePublishHook { |
9 | |
10 | /** |
11 | * This hook is executed in the ApiSectionTranslationPublish before a publish attempt. |
12 | * |
13 | * ApiSectionTranslationPublish will wait for implementations of this hook to complete before returning a response, |
14 | * so if the implementation needs to do something time-consuming that does not need to be sent back with the |
15 | * response, consider using a DeferredUpdate or Job. |
16 | * |
17 | * @param Title $title The article title to while sections are about to add. |
18 | * @param string $language The language of the article to be published. |
19 | * @param User $user |
20 | * @return void |
21 | */ |
22 | public function onSectionTranslationBeforePublish( |
23 | Title $title, |
24 | string $language, |
25 | User $user |
26 | ): void; |
27 | |
28 | } |