Expand all

ve.dm.MWTransclusionBlockNode

Extends

Constructor

new ve.dm.MWTransclusionBlockNode([element]) #

DataModel MediaWiki transclusion block node.

Parameters:

Name Type Attributes Description
element Object optional

Reference to element in linear model

Source:
DataModel MediaWiki transclusion block node.

Methods

getPartsList() → {Array.<Object>} #

Get a simplified description of the transclusion's parts.

Inherited from:
Source:

Returns:

List of objects with either template or content properties

Type
Array.<Object>
Get a simplified description of the transclusion's parts.

getWikitext() → {string} #

Wrapper for static method, {@see ve.dm.MWTransclusionNode.static.getWikitext} above.

Inherited from:
Source:

Returns:

Wikitext

Type
string
Wrapper for static method, {@see ve.dm.MWTransclusionNode.static.getWikitext} above.

isSingleTemplate([allowedTemplates]) → {boolean} #

Check if transclusion contains only a single template.

Parameters:

Name Type Attributes Description
allowedTemplates string | Array.<string> optional

Names of templates to allow, omit to allow any template name

Inherited from:
Source:

Returns:

Transclusion only contains a single template, which is one of the ones in templates

Type
boolean
Check if transclusion contains only a single template.

onAttributeChange(key, from, to) #

Handle attribute change events.

Parameters:

Name Type Description
key string

Attribute key

from string

Old value

to string

New value

Inherited from:
Source:
Handle attribute change events.