-
- // Show/hide animation doesn't work correctly on a table, so wrap it in a div.
- $limitReport .= Html::openElement( 'div', [ 'class' => 'preview-limit-report-wrapper' ] );
-
- $limitReport .= Html::openElement( 'table', [
- 'class' => 'preview-limit-report wikitable'
- ] ) .
- Html::openElement( 'tbody' );
-
- foreach ( $output->getLimitReportData() as $key => $value ) {
- if ( Hooks::run( 'ParserLimitReportFormat',
- [ $key, &$value, &$limitReport, true, true ]
- ) ) {
- $keyMsg = wfMessage( $key );
- $valueMsg = wfMessage( [ "$key-value-html", "$key-value" ] );
- if ( !$valueMsg->exists() ) {
- $valueMsg = new RawMessage( '$1' );
- }
- if ( !$keyMsg->isDisabled() && !$valueMsg->isDisabled() ) {
- $limitReport .= Html::openElement( 'tr' ) .
- Html::rawElement( 'th', null, $keyMsg->parse() ) .
- Html::rawElement( 'td', null, $valueMsg->params( $value )->parse() ) .
- Html::closeElement( 'tr' );
- }
- }
- }
-
- $limitReport .= Html::closeElement( 'tbody' ) .
- Html::closeElement( 'table' ) .
- Html::closeElement( 'div' );
-
- return $limitReport;