ElementSignature

ElementSignature

Class represents ElementSignature

Constructor

new ElementSignature(name, template)

Source:
Examples
new ElementSignature('xyz.element', () => import('./xyz.template.twig'))
new ElementSignature('xyz.element', () => import('./xyz.template.html'))
new ElementSignature('xyz.element')
Parameters:
Name Type Default Description
name string

name of the element usage will be referenced to this given name

template function | null null

callback function for template import

Methods

getImportElement() → {function|null}

Source:

get element import callback

Returns:
Type
function | null

getImportSchema() → {function|null}

Source:

get import schema callback

Returns:
Type
function | null

getImportTemplate() → {function|null}

Source:

get template import promise

Returns:
Type
function | null

setImportElement(element) → {ElementSignature}

Source:

set element import callback

Example
signature.setImportElement(() => import('./xyz.element').then((element) => element.XyzElement));
Parameters:
Name Type Description
element function
Returns:
Type
ElementSignature

setImportSchema(schema) → {ElementSignature}

Source:

set import schema callback

Example
signature.setImportSchema(() => import('./xyz.schema.json'));
Parameters:
Name Type Description
schema function
Returns:
Type
ElementSignature

setImportTemplate(template) → {ElementSignature}

Source:

set template import callback

Examples
signature.setImportTemplate(() => import('./xyz.template.html'));
signature.setImportTemplate(() => import('./xyz.template.twig'));
Parameters:
Name Type Description
template function
Returns:
Type
ElementSignature