Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7406134
ve.ui.ContextItemFactory.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
ve.ui.ContextItemFactory.js
View Options
/*!
* VisualEditor UserInterface ContextItemFactory class.
*
* @copyright See AUTHORS.txt
*/
/**
* Factory for context items.
*
* @class
* @extends OO.Factory
* @mixes ve.ui.ModeledFactory
*
* @constructor
*/
ve
.
ui
.
ContextItemFactory
=
function
VeUiContextItemFactory
()
{
// Parent constructor
ve
.
ui
.
ContextItemFactory
.
super
.
call
(
this
);
// Mixin constructors
ve
.
ui
.
ModeledFactory
.
call
(
this
);
};
/* Inheritance */
OO
.
inheritClass
(
ve
.
ui
.
ContextItemFactory
,
OO
.
Factory
);
OO
.
mixinClass
(
ve
.
ui
.
ContextItemFactory
,
ve
.
ui
.
ModeledFactory
);
/* Methods */
/**
* Check if an item is embeddable.
*
* @param {string} name Symbolic item name
* @return {boolean} Item is embeddable
*/
ve
.
ui
.
ContextItemFactory
.
prototype
.
isEmbeddable
=
function
(
name
)
{
if
(
Object
.
prototype
.
hasOwnProperty
.
call
(
this
.
registry
,
name
)
)
{
return
!!
this
.
registry
[
name
].
static
.
embeddable
;
}
throw
new
Error
(
'Unrecognized symbolic name: '
+
name
);
};
/**
* Check if an item is exclusive.
*
* @param {string} name Symbolic item name
* @return {boolean} Item is exclusive
*/
ve
.
ui
.
ContextItemFactory
.
prototype
.
isExclusive
=
function
(
name
)
{
if
(
Object
.
prototype
.
hasOwnProperty
.
call
(
this
.
registry
,
name
)
)
{
return
!!
this
.
registry
[
name
].
static
.
exclusive
;
}
throw
new
Error
(
'Unrecognized symbolic name: '
+
name
);
};
/* Initialization */
ve
.
ui
.
contextItemFactory
=
new
ve
.
ui
.
ContextItemFactory
();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 21, 20:14 (2 d, 16 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
cf/d9/857c7be2f471dbc06324a834c3c4
Default Alt Text
ve.ui.ContextItemFactory.js (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment