增加进化信息框

master
落雨楓 2 years ago
parent 045ed26cb3
commit 3689db480d

@ -76,14 +76,14 @@ class InformationWidget {
foreach ($dataMap as $information) { foreach ($dataMap as $information) {
if ($information['type'] === 'pair') { if ($information['type'] === 'pair') {
$stringBuilder[] = $information['label'] . $sep . $stringBuilder[] = $information['label'] . $sep .
Utils::makeParagraph($parser->recursiveTagParse($information['text'], $frame), false, true); Utils::makeParagraph($information['text'], false, true);
} }
} }
return [implode('', $stringBuilder), 'markerType' => 'nowiki']; return [implode('', $stringBuilder), 'markerType' => 'nowiki'];
} }
public static function buildTable(\Parser $parser, \PPFrame $frame, array $dataMap, $title, $picture, $float) { public static function buildTable(\Parser $parser, \PPFrame $frame, array $dataMap, $title, $picture, $float) {
} }
/** /**

@ -27,6 +27,8 @@ class Widgets {
$parser->setHook('details', [Html5Widget::class, 'createDetails']); $parser->setHook('details', [Html5Widget::class, 'createDetails']);
$parser->setHook('summary', [Html5Widget::class, 'createSummary']); $parser->setHook('summary', [Html5Widget::class, 'createSummary']);
$parser->setFunctionHook('information', [InformationWidget::class, 'create'], SFH_OBJECT_ARGS);
return true; return true;
} }

Loading…
Cancel
Save