Allow preferences that need not be rendered in Special:Preferences
[lhc/web/wiklou.git] / includes / HTMLForm.php
index ef24b62..952022f 100644 (file)
@@ -96,6 +96,7 @@ class HTMLForm extends ContextSource {
 
        // A mapping of 'type' inputs onto standard HTMLFormField subclasses
        static $typeMappings = array(
+               'api' => 'HTMLApiField',
                'text' => 'HTMLTextField',
                'textarea' => 'HTMLTextAreaField',
                'select' => 'HTMLSelectField',
@@ -2429,3 +2430,21 @@ class HTMLEditTools extends HTMLFormField {
                return $msg;
        }
 }
+
+class HTMLApiField extends HTMLFormField {
+       public function getTableRow( $value ) {
+               return '';
+       }
+
+       public function getDiv( $value ) {
+               return $this->getTableRow( $value );
+       }
+
+       public function getRaw( $value ) {
+               return $this->getTableRow( $value );
+       }
+
+       public function getInputHTML( $value ) {
+               return '';
+       }
+}