Go to the documentation of this file.
126 $this->stats->increment(
'edit.failures.conflict' );
129 $this->title->getNamespace() >=
NS_MAIN &&
132 $this->stats->increment(
133 'edit.failures.conflict.byNamespaceId.' . $this->title->getNamespace()
142 $this->stats->increment(
'edit.failures.conflict.resolved' );
145 $this->title->getNamespace() >=
NS_MAIN &&
148 $this->stats->increment(
149 'edit.failures.conflict.resolved.byNamespaceId.' . $this->title->getNamespace()
160 [
'class' =>
'mw-explainconflict' ],
161 $this->out->msg(
'explainconflict', $this->out->msg( $this->submitLabel )->text() )->parse()
172 $classes = $builder->getTextboxProtectionCSSClasses( $this->title );
174 $attribs = [
'tabindex' => 1 ];
175 $attribs += $customAttribs;
177 $attribs = $builder->mergeClassesIntoAttributes( $classes, $attribs );
179 $attribs = $builder->buildTextboxAttribs(
182 $this->out->getUser(),
187 Html::textarea(
'wpTextbox1', $builder->addNewLineAtEnd( $this->storedversion ), $attribs )
216 $this->out->wrapWikiMsg(
'<h2>$1</h2>',
"yourdiff" );
219 $storedContent = $this->
toEditContent( $this->storedversion );
221 $diffEngine = $handler->createDifferenceEngine( $this->out );
223 $diffEngine->setContent( $yourContent, $storedContent );
224 $diffEngine->showDiff(
225 $this->out->msg(
'yourtext' )->parse(),
226 $this->out->msg(
'storedversion' )->text()
229 $this->out->wrapWikiMsg(
'<h2>$1</h2>',
"yourtext" );
232 $attribs = $builder->buildTextboxAttribs(
234 [
'tabindex' => 6,
'readonly' ],
235 $this->out->getUser(),
240 Html::textarea(
'wpTextbox2', $builder->addNewLineAtEnd( $this->yourtext ), $attribs )
null string $contentModel
A content handler knows how do deal with a specific type of content on a wiki page.
static getForModelID( $modelId)
Returns the ContentHandler singleton for the given model ID.
static textarea( $name, $value='', array $attribs=[])
Convenience function to produce a <textarea> element.
Helps EditPage build textboxes.
showEditFormTextAfterFooters()
Content to go in the edit form after the footers (templates on this page, hidden categories,...
setContentFormat( $contentFormat)
This is one of the Core classes and should be read at least once by any new developers.
static makeContent( $text, Title $title=null, $modelId=null, $format=null)
Convenience function for creating a Content object from a given textual representation.
setTextboxes( $yourtext, $storedversion)
Helper for displaying edit conflicts in text content models to users.
getEditFormHtmlAfterContent()
Content to go in the edit form after textbox1.
getContentModel( $flags=0)
Get the page's content model id, see the CONTENT_MODEL_XXX constants.
incrementConflictStats()
Record a user encountering an edit conflict.
setContentModel( $contentModel)
string $submitLabel
Message key for submit button's label.
Base interface for content objects.
MediaWiki adaptation of StatsdDataFactory that provides buffering functionality.
null string $contentFormat
Represents a title within MediaWiki.
getEditFormHtmlBeforeContent()
Content to go in the edit form before textbox1.
__construct(Title $title, OutputPage $out, IBufferingStatsdDataFactory $stats, $submitLabel)
incrementResolvedStats()
Record when a user has resolved an edit conflict.
static rawElement( $element, $attribs=[], $contents='')
Returns an HTML element in a string.
getEditConflictMainTextBox(array $customAttribs=[])
HTML to build the textbox1 on edit conflicts.
IBufferingStatsdDataFactory $stats
This class is a collection of static functions that serve two purposes: