Revert "Move NewPP limit report HTML comments to JS variables" and followups
[lhc/web/wiklou.git] / includes / linker / LinkRendererFactory.php
index 7124be1..b7c05c2 100644 (file)
@@ -21,6 +21,7 @@
  */
 namespace MediaWiki\Linker;
 
+use LinkCache;
 use TitleFormatter;
 use User;
 
@@ -35,18 +36,25 @@ class LinkRendererFactory {
         */
        private $titleFormatter;
 
+       /**
+        * @var LinkCache
+        */
+       private $linkCache;
+
        /**
         * @param TitleFormatter $titleFormatter
+        * @param LinkCache $linkCache
         */
-       public function __construct( TitleFormatter $titleFormatter ) {
+       public function __construct( TitleFormatter $titleFormatter, LinkCache $linkCache ) {
                $this->titleFormatter = $titleFormatter;
+               $this->linkCache = $linkCache;
        }
 
        /**
         * @return LinkRenderer
         */
        public function create() {
-               return new LinkRenderer( $this->titleFormatter );
+               return new LinkRenderer( $this->titleFormatter, $this->linkCache );
        }
 
        /**