Merge "Prepare for REL1_33 cut, labelling master as 1.34-alpha"
[lhc/web/wiklou.git] / includes / htmlform / HTMLForm.php
index e5330b6..aeeb934 100644 (file)
@@ -221,6 +221,20 @@ class HTMLForm extends ContextSource {
         */
        protected $mAction = false;
 
+       /**
+        * Whether the HTML form can be collapsed
+        * @since 1.33
+        * @var bool
+        */
+       protected $mCollapsible = false;
+
+       /**
+        * Whether the HTML form IS collapsed by default
+        * @since 1.33
+        * @var bool
+        */
+       protected $mCollapsed = false;
+
        /**
         * Form attribute autocomplete. A typical value is "off". null does not set the attribute
         * @since 1.27
@@ -1047,6 +1061,18 @@ class HTMLForm extends ContextSource {
                return '' . $this->mPre . $html . $this->mPost;
        }
 
+       /**
+        * Make the form collapsible
+        * @since 1.33
+        * @param bool $collapsed whether it should be by default
+        * @return HTMLForm $this for chaining calls (since 1.20)
+        */
+       public function setCollapsible( $collapsed = false ) {
+               $this->mCollapsible = true;
+               $this->mCollapsed = $collapsed;
+               return $this;
+       }
+
        /**
         * Get HTML attributes for the `<form>` tag.
         * @return array