Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ICardService

Class for working with ICards by defining types and instantiating/destroying card instances

Hierarchy

  • ICardService

Index

Methods

createCard

  • createCard(cardId: string, location?: ICardLocation, ...parameters: any[]): ICard | undefined
  • Creates a new card instance

    Parameters

    • cardId: string

      The card id from the ICardConfig.id

    • Optional location: ICardLocation

      The starting location for the card. If undefined, the card will be placed in the the default location from ICardConfig or the default location for the layout.

    • Rest ...parameters: any[]

      Additional parameters to make available to the card instance. These are placed in the ICard.parameters array.

    Returns ICard | undefined

    A new ICard if successful, undefined if an error occurred

defineCard

  • Defines one or more new card types

    Parameters

    • Rest ...config: ICardConfig[]

      The card configuration(s)

    Returns boolean

    true if successful, false if an error occurred

destroyCard

  • destroyCard(card: ICard): void
  • Removes a card from the card service. This method should be called when a temporary card is no longer needed. It is not necessary to call destroyCard() for any cards when the card service is being shut down.

    Parameters

    Returns void