Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 13 |
|
0.00% |
0 / 5 |
CRAP | |
0.00% |
0 / 1 |
ApiFlowViewTopicHistory | |
0.00% |
0 / 13 |
|
0.00% |
0 / 5 |
30 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getBlockParams | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getAction | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getAllowedParams | |
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
2 | |||
getExamplesMessages | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | namespace Flow\Api; |
4 | |
5 | use Wikimedia\ParamValidator\ParamValidator; |
6 | |
7 | class ApiFlowViewTopicHistory extends ApiFlowBaseGet { |
8 | public function __construct( $api, $modName ) { |
9 | parent::__construct( $api, $modName, 'vth' ); |
10 | } |
11 | |
12 | /** |
13 | * @return array |
14 | */ |
15 | protected function getBlockParams() { |
16 | return [ 'topic' => $this->extractRequestParams() ]; |
17 | } |
18 | |
19 | protected function getAction() { |
20 | return 'view-topic-history'; |
21 | } |
22 | |
23 | public function getAllowedParams() { |
24 | return [ |
25 | 'format' => [ |
26 | ParamValidator::PARAM_TYPE => [ 'html', 'wikitext', 'fixed-html' ], |
27 | ParamValidator::PARAM_DEFAULT => 'fixed-html', |
28 | ], |
29 | ]; |
30 | } |
31 | |
32 | /** |
33 | * @inheritDoc |
34 | */ |
35 | protected function getExamplesMessages() { |
36 | return [ |
37 | 'action=flow&submodule=view-topic-history&page=Topic:S2tycnas4hcucw8w&vthformat=wikitext' |
38 | => 'apihelp-flow+view-topic-history-example-1', |
39 | ]; |
40 | } |
41 | } |