SpecialJavaScriptTest: Implement prefixSearchSubpages()
authorBartosz Dziewoński <matma.rex@gmail.com>
Mon, 23 Jun 2014 20:16:31 +0000 (22:16 +0200)
committerTimo Tijhof <krinklemail@gmail.com>
Tue, 24 Jun 2014 00:20:56 +0000 (02:20 +0200)
Change-Id: I26ae06eb472e843197f7dc04b610e87d3cd9ed1e

includes/specials/SpecialJavaScriptTest.php

index 1c4f79f..03b3688 100644 (file)
@@ -173,6 +173,21 @@ HTML;
                );
        }
 
+       /**
+        * Return an array of subpages beginning with $search that this special page will accept.
+        *
+        * @param string $search Prefix to search for
+        * @param integer $limit Maximum number of results to return
+        * @return string[] Matching subpages
+        */
+       public function prefixSearchSubpages( $search, $limit = 10 ) {
+               return self::prefixSearchArray(
+                       $search,
+                       $limit,
+                       array_keys( self::$frameworks )
+               );
+       }
+
        protected function getGroupName() {
                return 'other';
        }