Merge "OutputPage: Add addHeadItems() method"
[lhc/web/wiklou.git] / includes / OutputPage.php
index 753c3b7..b6c48ab 100644 (file)
@@ -633,7 +633,7 @@ class OutputPage extends ContextSource {
        }
 
        /**
-        * Add or replace an header item to the output
+        * Add or replace a head item to the output
         *
         * Whenever possible, use more specific options like ResourceLoader modules,
         * OutputPage::addLink(), OutputPage::addMetaLink() and OutputPage::addFeedLink()
@@ -648,6 +648,16 @@ class OutputPage extends ContextSource {
                $this->mHeadItems[$name] = $value;
        }
 
+       /**
+        * Add one or more head items to the output
+        *
+        * @since 1.28
+        * @param string|string[] $value Raw HTML
+        */
+       public function addHeadItems( $values ) {
+               $this->mHeadItems = array_merge( $this->mHeadItems, (array)$values );
+       }
+
        /**
         * Check if the header item $name is already set
         *