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
getElementImport() → {function|null}
- Source:
get element import callback
Returns:
- Type
- function | null
getImportSchema() → {function|null}
- Source:
get import schema callback
Returns:
- Type
- function | null
getTemplateImport() → {function|null}
- Source:
get template import promise
Returns:
- Type
- function | null
setElementImport(element) → {ElementSignature}
- Source:
set element import callback
Example
signature.setElementImport(() => 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
setTemplateImport(template) → {ElementSignature}
- Source:
set template import callback
Examples
signature.setTemplateImport(() => import('./xyz.template.html'));
signature.setTemplateImport(() => import('./xyz.template.twig'));
Parameters:
Name | Type | Description |
---|---|---|
template |
function |
Returns:
- Type
- ElementSignature