HTMLForm: Improve method documentation for setCollapsibleOptions()
authorTimo Tijhof <krinklemail@gmail.com>
Wed, 22 May 2019 22:38:45 +0000 (23:38 +0100)
committerTimo Tijhof <krinklemail@gmail.com>
Wed, 22 May 2019 22:40:52 +0000 (23:40 +0100)
Follows-up 36d33daa03a63.

Previously the method was described as "Set whether the form can be collapsed"
taking a single boolean.

Yet, the boolean did not influence whether the form can be collapsed, as one
might expect.

Rather, this method always enable collapsible mode. The thing that is set
based on the passed value is the default state of that (unconditionally)
enabled collapsible mode.

Change-Id: I2e73d5481c44ed43769553b2bc25543a702c19b8

includes/htmlform/HTMLForm.php

index f5be83f..5042028 100644 (file)
@@ -1062,10 +1062,10 @@ class HTMLForm extends ContextSource {
        }
 
        /**
-        * Set whether the HTML form can be collapsed.
+        * Enable collapsible mode, and set whether the form is collapsed by default.
         *
         * @since 1.34
-        * @param bool $collapsedByDefault (optional) whether the form is collapsed by default
+        * @param bool $collapsedByDefault Whether the form is collapsed by default (optional).
         * @return HTMLForm $this for chaining calls
         */
        public function setCollapsibleOptions( $collapsedByDefault = false ) {