# Class TemplateCache

Holds a reference to all template available in the framework

## Index

### Methods

- getDefaultTemplate
- getDefaultTemplates
- getResultListTemplateNames
- getTemplate
- getTemplateNames
- getTemplates
- registerTemplate
- unregisterTemplate

## Methods

### Static getDefaultTemplate

- getDefaultTemplate(name: string): Template

- - Defined in ui/Templates/TemplateCache.ts :134

  Get a default template by name.

  #### Parameters

  - ##### name: string

    The name of the queried template

  #### Returns Template

### Static getDefaultTemplates

- getDefaultTemplates(): string[]

- - Defined in ui/Templates/TemplateCache.ts :126

  Get all the "default" templates in the framework.

  #### Returns string[]

### Static getResultListTemplateNames

- getResultListTemplateNames(): string[]

- - Defined in ui/Templates/TemplateCache.ts :118

  Get all page templates name currently registered in the framework.

  #### Returns string[]

### Static getTemplate

- getTemplate(name: string): Template

- - Defined in ui/Templates/TemplateCache.ts :87

  Return a template by its name/FacID.

  #### Parameters

  - ##### name: string

  #### Returns Template

### Static getTemplateNames

- getTemplateNames(): string[]

- - Defined in ui/Templates/TemplateCache.ts :110

  Get all templates name currently registered in the framework.

  #### Returns string[]

### Static getTemplates

- getTemplates(): object

- - Defined in ui/Templates/TemplateCache.ts :102

  Get all templates currently registered in the framework.

  #### Returns object

  - ##### [templateName: string]: Template

### Static registerTemplate

- registerTemplate(name: string, template: any, publicTemplate?: boolean, defaultTemplate?: boolean, resultListTemplate?: boolean): void

- - Defined in ui/Templates/TemplateCache.ts :38

  Register a new template in the framework, which will be available to render any results.

  #### Parameters

  - ##### name: string

  - ##### template: any

  - ##### Default value publicTemplate: boolean = true

  - ##### Default value defaultTemplate: boolean = false

  - ##### Default value resultListTemplate: boolean = false

  #### Returns void

### Static unregisterTemplate

- unregisterTemplate(name: any): void

- - Defined in ui/Templates/TemplateCache.ts :72

  Remove the given template from the cache.

  #### Parameters

  - ##### name: any

  #### Returns void

### Hierarchy

- TemplateCache