X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialJavaScriptTest.php;h=03b368887f13506ae01cc214d7fd713bcfa09eff;hb=b4ed05d6a28a77c87b8a9f942248621de66597fb;hp=7982d5c8c0809973f47d2bf504826720a386f383;hpb=1a7324ed643512be940aa9c59f385ce16a71cb9f;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialJavaScriptTest.php b/includes/specials/SpecialJavaScriptTest.php index 7982d5c8c0..03b368887f 100644 --- a/includes/specials/SpecialJavaScriptTest.php +++ b/includes/specials/SpecialJavaScriptTest.php @@ -25,13 +25,12 @@ * @ingroup SpecialPage */ class SpecialJavaScriptTest extends SpecialPage { - /** - * @var $frameworks Array: Mapping of framework ids and their initilizer methods + * @var array Mapping of framework ids and their initilizer methods * in this class. If a framework is requested but not in this array, * the 'unknownframework' error is served. */ - static $frameworks = array( + private static $frameworks = array( 'qunit' => 'initQUnitTesting', ); @@ -174,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'; }