Skip to main content

Class: MetaManagerImpl

@ima/core.MetaManagerImpl

Default implementation of the MetaManager interface.

Hierarchy

Constructors

constructor

new MetaManagerImpl()

Initializes the meta page attributes manager.

Overrides

MetaManager.constructor

Defined in

packages/core/src/meta/MetaManagerImpl.ts:19

Properties

Protected _link: Map<string, string>

Defined in

packages/core/src/meta/MetaManagerImpl.ts:10


_metaName

Protected _metaName: Map<string, string>

Defined in

packages/core/src/meta/MetaManagerImpl.ts:8


_metaProperty

Protected _metaProperty: Map<string, string>

Defined in

packages/core/src/meta/MetaManagerImpl.ts:9


_title

Protected _title: string

Defined in

packages/core/src/meta/MetaManagerImpl.ts:7

Accessors

$dependencies

Static get $dependencies(): never[]

Returns

never[]

Defined in

packages/core/src/meta/MetaManagerImpl.ts:12

Methods

getLink(relation): string

Return the reference to the specified related linked document. The method returns an empty string for missing meta information (to make the returned value React-friendly).

Parameters

NameTypeDescription
relationstringThe relation of the link target to the current page.

Returns

string

The reference to the location of the related document, e.g. a URL.

Overrides

MetaManager.getLink

Defined in

packages/core/src/meta/MetaManagerImpl.ts:109


getLinks(): string[]

Returns the relations of the currently set related documents linked to the current page.

Returns

string[]

Overrides

MetaManager.getLinks

Defined in

packages/core/src/meta/MetaManagerImpl.ts:116


getMetaName

getMetaName(name): string

Returns the value of the specified named meta information property. The method returns an empty string for missing meta information (to make the returned value React-friendly).

Parameters

NameTypeDescription
namestringThe name of the named meta information property.

Returns

string

The value of the generic meta information, or an empty string.

Overrides

MetaManager.getMetaName

Defined in

packages/core/src/meta/MetaManagerImpl.ts:67


getMetaNames

getMetaNames(): string[]

Returns the names of the currently specified named meta information properties.

Returns

string[]

The names of the currently specified named meta information properties.

Overrides

MetaManager.getMetaNames

Defined in

packages/core/src/meta/MetaManagerImpl.ts:74


getMetaProperties

getMetaProperties(): string[]

Returns the names of the currently specified specialized meta information properties.

Returns

string[]

The names of the currently specified specialized meta information properties.

Overrides

MetaManager.getMetaProperties

Defined in

packages/core/src/meta/MetaManagerImpl.ts:95


getMetaProperty

getMetaProperty(name): string

Returns the value of the specified specialized meta information property. The method returns an empty string for missing meta information (to make the returned value React-friendly).

Parameters

NameTypeDescription
namestringThe name of the specialized meta information property.

Returns

string

The value of the specified meta information, or an empty string.

Overrides

MetaManager.getMetaProperty

Defined in

packages/core/src/meta/MetaManagerImpl.ts:88


getTitle

getTitle(): string

Returns the page title. The method returns an empty string if no page title has been set yet.

Note that the page title is cached internally by the meta manager and may therefore differ from the current document title if it has been modified by a 3rd party code.

Returns

string

The current page title.

Overrides

MetaManager.getTitle

Defined in

packages/core/src/meta/MetaManagerImpl.ts:53


setLink(relation, value): void

Sets the specified specialized link information.

Parameters

NameTypeDescription
relationstringThe relation of the link target to the current page.
valuestringThe reference to the location of the related document, e.g. a URL.

Returns

void

Overrides

MetaManager.setLink

Defined in

packages/core/src/meta/MetaManagerImpl.ts:102


setMetaName

setMetaName(name, value): void

Set the specified named meta information property.

Parameters

NameTypeDescription
namestringMeta information property name, for example keywords.
valuestringThe meta information value.

Returns

void

Overrides

MetaManager.setMetaName

Defined in

packages/core/src/meta/MetaManagerImpl.ts:60


setMetaProperty

setMetaProperty(name, value): void

Sets the specified specialized meta information property.

Parameters

NameTypeDescription
namestringName of the specialized meta information property.
valuestringThe value of the meta information property.

Returns

void

Overrides

MetaManager.setMetaProperty

Defined in

packages/core/src/meta/MetaManagerImpl.ts:81


setTitle

setTitle(title): void

Sets the page title.

Parameters

NameTypeDescription
titlestringThe new page title.

Returns

void

Overrides

MetaManager.setTitle

Defined in

packages/core/src/meta/MetaManagerImpl.ts:46