| 1 | <?php |
||
| 13 | class ModernTimelinePrinter implements ResultPrinter { |
||
| 14 | |||
| 15 | public function getName(): string { |
||
| 16 | return wfMessage( 'modern-timeline-format-name' )->text(); |
||
| 17 | } |
||
| 18 | |||
| 19 | public function getParamDefinitions( array $definitions ) { |
||
| 20 | return array_merge( $definitions, TimelineOptions::getTimelineParameterDefinitions() ); |
||
| 21 | } |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @param SMWQueryResult $result |
||
| 25 | * @param ProcessedParam[] $parameters Note: currently getting Param[] from SMW but lets pretend the legacy refactor happened already |
||
| 26 | * @param int $outputMode |
||
| 27 | * |
||
| 28 | * @return string |
||
| 29 | */ |
||
| 30 | public function getResult( SMWQueryResult $result, array $parameters, $outputMode ): string { |
||
| 31 | return ( new TimelinePresenter( $parameters ) )->getResult( $result ); |
||
| 32 | } |
||
| 33 | |||
| 34 | public function getQueryMode( $context ): int { |
||
| 35 | return SMWQuery::MODE_INSTANCES; |
||
| 36 | } |
||
| 37 | |||
| 38 | public function setShowErrors( $show ) { |
||
| 40 | |||
| 41 | public function isExportFormat(): bool { |
||
| 42 | return false; |
||
| 43 | } |
||
| 44 | |||
| 45 | public function getDefaultSort(): string { |
||
| 48 | |||
| 49 | public function isDeferrable(): bool { |
||
| 52 | |||
| 53 | public function supportsRecursiveAnnotation(): bool { |
||
| 56 | |||
| 57 | public function setRecursiveTextProcessor( RecursiveTextProcessor $recursiveTextProcessor ) { |
||
| 59 | } |