| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
ve.ui.ContextItemFactory = function VeUiContextItemFactory() { |
| 17 |
|
| 18 |
ve.ui.ContextItemFactory.super.call( this ); |
| 19 |
|
| 20 |
|
| 21 |
ve.ui.ModeledFactory.call( this ); |
| 22 |
}; |
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
OO.inheritClass( ve.ui.ContextItemFactory, OO.Factory ); |
| 27 |
OO.mixinClass( ve.ui.ContextItemFactory, ve.ui.ModeledFactory ); |
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
ve.ui.ContextItemFactory.prototype.isEmbeddable = function ( name ) { |
| 38 |
if ( Object.prototype.hasOwnProperty.call( this.registry, name ) ) { |
| 39 |
return !!this.registry[ name ].static.embeddable; |
| 40 |
} |
| 41 |
throw new Error( 'Unrecognized symbolic name: ' + name ); |
| 42 |
}; |
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
ve.ui.ContextItemFactory.prototype.isExclusive = function ( name ) { |
| 51 |
if ( Object.prototype.hasOwnProperty.call( this.registry, name ) ) { |
| 52 |
return !!this.registry[ name ].static.exclusive; |
| 53 |
} |
| 54 |
throw new Error( 'Unrecognized symbolic name: ' + name ); |
| 55 |
}; |
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
ve.ui.contextItemFactory = new ve.ui.ContextItemFactory(); |