95 $this->contentModel = $title->getContentModel();
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()
173 $classes = $builder->getTextboxProtectionCSSClasses( $this->title );
180 $attribs = $builder->buildTextboxAttribs(
183 $this->out->getUser(),
217 $this->out->wrapWikiMsg(
'<h2>$1</h2>',
"yourdiff" );
220 $storedContent = $this->
toEditContent( $this->storedversion );
222 $diffEngine =
$handler->createDifferenceEngine( $this->out );
224 $diffEngine->setContent( $yourContent, $storedContent );
225 $diffEngine->showDiff(
226 $this->out->msg(
'yourtext' )->parse(),
227 $this->out->msg(
'storedversion' )->text()
230 $this->out->wrapWikiMsg(
'<h2>$1</h2>',
"yourtext" );
233 $attribs = $builder->buildTextboxAttribs(
235 [
'tabindex' => 6,
'readonly' ],
236 $this->out->getUser(),
A content handler knows how do deal with a specific type of content on a wiki page.
static makeContent( $text, Title $title=null, $modelId=null, $format=null)
Convenience function for creating a Content object from a given textual representation.
static getForModelID( $modelId)
Returns the ContentHandler singleton for the given model ID.
This class is a collection of static functions that serve two purposes:
static textarea( $name, $value='', array $attribs=[])
Convenience function to produce a <textarea> element.
static rawElement( $element, $attribs=[], $contents='')
Returns an HTML element in a string.
Helper for displaying edit conflicts in text content models to users.
getEditConflictMainTextBox( $customAttribs=[])
HTML to build the textbox1 on edit conflicts.
null string $contentModel
getEditFormHtmlAfterContent()
Content to go in the edit form after textbox1.
incrementConflictStats()
Record a user encountering an edit conflict.
showEditFormTextAfterFooters()
Content to go in the edit form after the footers (templates on this page, hidden categories,...
null string $contentFormat
IBufferingStatsdDataFactory $stats
incrementResolvedStats()
Record when a user has resolved an edit conflict.
setContentFormat( $contentFormat)
setContentModel( $contentModel)
__construct(Title $title, OutputPage $out, IBufferingStatsdDataFactory $stats, $submitLabel)
setTextboxes( $yourtext, $storedversion)
string $submitLabel
Message key for submit button's label.
getEditFormHtmlBeforeContent()
Content to go in the edit form before textbox1.
Helps EditPage build textboxes.
This class should be covered by a general architecture document which does not exist as of January 20...
Represents a title within MediaWiki.
null means default & $customAttribs
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses after processing & $attribs
this hook is for auditing only or null if authentication failed before getting that far or null if we can t even determine that probably a stub it is not rendered in wiki pages or galleries in category pages allow injecting custom HTML after the section Any uses of the hook need to handle escaping see BaseTemplate::getToolbox and BaseTemplate::makeListItem for details on the format of individual items inside of this array or by returning and letting standard HTTP rendering take place modifiable or by returning false and taking over the output modifiable modifiable after all normalizations have been except for the $wgMaxImageArea check set to true or false to override the $wgMaxImageArea check result gives extension the possibility to transform it themselves $handler
Base interface for content objects.
MediaWiki adaptation of StatsdDataFactory that provides buffering functionality.