Debian Codegraph @

resources/src/mediawiki.widgets/mw.widgets.NamespacesMenuOptionWidget.js

raw symbols SCIP
1 /*!
2 * MediaWiki Widgets - NamespacesMenuOptionWidget class.
3 *
4 * @copyright 2011-2015 MediaWiki Widgets Team and others; see AUTHORS.txt
5 * @license The MIT License (MIT); see LICENSE.txt
6 */
7 ( function () {
8
9 /**
10 * @classdesc Returns an item match text that includes both the label
11 * and the data, so the menu can filter on either.
12 *
13 * @class
14 * @extends OO.ui.MenuOptionWidget
15 *
16 * @constructor
17 * @description Create an mw.widgets.NamespacesMenuOptionWidget object.
18 * @param {Object} [config] Configuration options
19 */
20 mw.widgets.NamespacesMenuOptionWidget = function MwWidgetsNamespacesMenuOptionWidget( config ) {
21 // Parent
22 mw.widgets.NamespacesMenuOptionWidget.super.call( this, config );
23 };
24
25 /* Setup */
26
27 OO.inheritClass( mw.widgets.NamespacesMenuOptionWidget, OO.ui.MenuOptionWidget );
28
29 /**
30 * @inheritdoc
31 */
32 mw.widgets.NamespacesMenuOptionWidget.prototype.getMatchText = function () {
33 return this.getData() + ' ' + this.getLabel();
34 };
35
36 }() );