Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 11 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 1 |
| CargoEmbeddedFormat | |
0.00% |
0 / 11 |
|
0.00% |
0 / 3 |
20 | |
0.00% |
0 / 1 |
| allowedParameters | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| displayRow | |
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
2 | |||
| display | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
6 | |||
| 1 | <?php |
| 2 | /** |
| 3 | * @author Yaron Koren |
| 4 | * @ingroup Cargo |
| 5 | */ |
| 6 | |
| 7 | class CargoEmbeddedFormat extends CargoDisplayFormat { |
| 8 | |
| 9 | public static function allowedParameters() { |
| 10 | return []; |
| 11 | } |
| 12 | |
| 13 | protected function displayRow( $row ) { |
| 14 | $pageName = reset( $row ); |
| 15 | $wikiText = <<<END |
| 16 | <p style="font-size: small; text-align: right;">[[$pageName]]</p> |
| 17 | {{:$pageName}} |
| 18 | |
| 19 | |
| 20 | -------------- |
| 21 | |
| 22 | END; |
| 23 | return $wikiText; |
| 24 | } |
| 25 | |
| 26 | /** |
| 27 | * @param array $valuesTable |
| 28 | * @param array $formattedValuesTable Unused |
| 29 | * @param array $fieldDescriptions Unused |
| 30 | * @param array $displayParams Unused |
| 31 | * @return string |
| 32 | */ |
| 33 | public function display( $valuesTable, $formattedValuesTable, $fieldDescriptions, $displayParams ) { |
| 34 | $text = ''; |
| 35 | foreach ( $valuesTable as $row ) { |
| 36 | $text .= $this->displayRow( $row ); |
| 37 | } |
| 38 | return CargoUtils::smartParse( $text, $this->mParser ); |
| 39 | } |
| 40 | |
| 41 | } |