protected $rclistOpen;
protected $rcMoveIndex;
+ /** @var callable */
+ protected $changeLinePrefixer;
+
/** @var BagOStuff */
protected $watchMsgCache;
* @return array of classes
*/
protected function getHTMLClasses( $rc, $watched ) {
- $classes = [];
+ $classes = [ self::CSS_CLASS_PREFIX . 'line' ];
$logType = $rc->mAttribs['rc_log_type'];
if ( $logType ) {
+ $classes[] = self::CSS_CLASS_PREFIX . 'log';
$classes[] = Sanitizer::escapeClass( self::CSS_CLASS_PREFIX . 'log-' . $logType );
} else {
+ $classes[] = self::CSS_CLASS_PREFIX . 'edit';
$classes[] = Sanitizer::escapeClass( self::CSS_CLASS_PREFIX . 'ns' .
$rc->mAttribs['rc_namespace'] . '-' . $rc->mAttribs['rc_title'] );
$classes[] = Sanitizer::escapeClass( self::CSS_CLASS_PREFIX . 'ns-' .
return $attrs;
}
+
+ /**
+ * Sets the callable that generates a change line prefix added to the beginning of each line.
+ *
+ * @param callable $prefixer Callable to run that generates the change line prefix.
+ * Takes three parameters: a RecentChange object, a ChangesList object,
+ * and whether the current entry is a grouped entry.
+ */
+ public function setChangeLinePrefixer( callable $prefixer ) {
+ $this->changeLinePrefixer = $prefixer;
+ }
}