Merge "Improve docs for Title::getInternalURL/getCanonicalURL"
[lhc/web/wiklou.git] / includes / editpage / TextConflictHelper.php
index 6e7e7ee..2471b52 100644 (file)
@@ -162,6 +162,32 @@ class TextConflictHelper {
                );
        }
 
+       /**
+        * HTML to build the textbox1 on edit conflicts
+        *
+        * @param array $customAttribs
+        */
+       public function getEditConflictMainTextBox( array $customAttribs = [] ) {
+               $builder = new TextboxBuilder();
+               $classes = $builder->getTextboxProtectionCSSClasses( $this->title );
+
+               $attribs = [ 'tabindex' => 1 ];
+               $attribs += $customAttribs;
+
+               $attribs = $builder->mergeClassesIntoAttributes( $classes, $attribs );
+
+               $attribs = $builder->buildTextboxAttribs(
+                       'wpTextbox1',
+                       $attribs,
+                       $this->out->getUser(),
+                       $this->title
+               );
+
+               $this->out->addHTML(
+                       Html::textarea( 'wpTextbox1', $builder->addNewLineAtEnd( $this->storedversion ), $attribs )
+               );
+       }
+
        /**
         * Content to go in the edit form before textbox1
         *