Options
All
  • Public
  • Public/Protected
  • All
Menu

A component that can be configured in the UI.

Hierarchy

Index

Methods

  • getComponent<U>(...componentNames: string[]): undefined | U
  • getComponent(): ContainerItem
  • Looks up a nested component by a sequence of names (e.g. getComponent('main', 'banner')).

    Type Parameters

    Parameters

    • Rest ...componentNames: string[]

      Names of the component and its ancestors, from outermost to innermost.

    Returns undefined | U

    The matching component, or undefined if not found.

  • Returns the component itself when called with no arguments.

    Returns ContainerItem

  • Looks up a nested component by its id, searching the full subtree.

    Type Parameters

    Parameters

    • id: string

      The component id to find.

    Returns undefined | ContainerItem | U

    The matching component (typed as U), this component if the id matches, or undefined if not found.

  • getContent<T>(page: Page): null | T
  • Returns the content of this component.

    Type Parameters

    • T

    Parameters

    • page: Page

      The page that contains the content

    Returns null | T

  • Returns a RFC-6901 JSON Pointer to the content of this container item.

    Returns undefined | Reference

  • getId(): string
  • getLabel(): undefined | string
  • Returns the label of a container item catalogue component.

    Returns undefined | string

    The label of a catalogue component (e.g. "News List").

  • getModels<T>(): T
  • getName(): string
  • getParameters<T>(): T
  • getProperties<T>(): T
  • getType(): undefined | string
  • Returns the type of a container item. The available types depend on which container items have been configured in the backend.

    Returns undefined | string

    The type of a container item (e.g. "Banner").

  • getUrl(): undefined | string
  • Returns undefined | string

    The link to the partial component model.

  • isHidden(): boolean
  • Returns whether the component should not render anything. Hiding components is only possible with the Relevance feature.

    Returns boolean

    Whether the component is hidden or not.

  • Unsubscribes from an event.

    Type Parameters

    • U extends "update"

    Parameters

    Returns void