Implement page status indicators
[lhc/web/wiklou.git] / includes / parser / ParserOutput.php
index 43e8d0b..428e7b2 100644 (file)
@@ -25,6 +25,7 @@ class ParserOutput extends CacheTime {
        public $mText,                       # The output text
                $mLanguageLinks,              # List of the full text of language links, in the order they appear
                $mCategories,                 # Map of category names to sort keys
+               $mIndicators = array(),       # Page status indicators, usually displayed in top-right corner
                $mTitleText,                  # title text of the chosen language variant
                $mLinks = array(),            # 2-D map of NS/DBK to ID for the links in the document. ID=zero for broken.
                $mTemplates = array(),        # 2-D map of NS/DBK to ID for the template references. ID=zero for broken.
@@ -130,6 +131,13 @@ class ParserOutput extends CacheTime {
                return $this->mCategories;
        }
 
+       /**
+        * @since 1.25
+        */
+       public function getIndicators() {
+               return $this->mIndicators;
+       }
+
        public function getTitleText() {
                return $this->mTitleText;
        }
@@ -267,6 +275,13 @@ class ParserOutput extends CacheTime {
                $this->mCategories[$c] = $sort;
        }
 
+       /**
+        * @since 1.25
+        */
+       public function setIndicator( $id, $content ) {
+               $this->mIndicators[$id] = $content;
+       }
+
        public function addLanguageLink( $t ) {
                $this->mLanguageLinks[] = $t;
        }