}
$lang = $this->getLanguage();
- $langAttribs = [ 'lang' => $lang->getHtmlCode(), 'dir' => $lang->getDir() ];
+ $attribs = [
+ 'class' => 'mw-category-generated',
+ 'lang' => $lang->getHtmlCode(),
+ 'dir' => $lang->getDir()
+ ];
# put a div around the headings which are in the user language
- $r = Html::openElement( 'div', $langAttribs ) . $r . '</div>';
+ $r = Html::openElement( 'div', $attribs ) . $r . '</div>';
return $r;
}
}
/**
- * Format a list of articles chunked by letter in a three-column
- * list, ordered vertically.
+ * Format a list of articles chunked by letter in a three-column list, ordered
+ * vertically. This is used for categories with a significant number of pages.
*
* TODO: Take the headers into account when creating columns, so they're
* more visually equal.
*
* TODO: shortList and columnList are similar, need merging
*
- * @param array $articles
- * @param string[] $articles_start_char
- * @return string
+ * @param string[] $articles HTML links to each article
+ * @param string[] $articles_start_char The header characters for each article
+ * @return string HTML to output
* @private
*/
static function columnList( $articles, $articles_start_char ) {
}
/**
- * Format a list of articles chunked by letter in a bullet list.
- * @param array $articles
- * @param string[] $articles_start_char
- * @return string
+ * Format a list of articles chunked by letter in a bullet list. This is used
+ * for categories with a small number of pages (when columns aren't needed).
+ * @param string[] $articles HTML links to each article
+ * @param string[] $articles_start_char The header characters for each article
+ * @return string HTML to output
* @private
*/
static function shortList( $articles, $articles_start_char ) {