Interface ModeSwitchServiceInterface

interface ModeSwitchServiceInterface {
    getAvailableModes(): ModeState[];
    switchToMode(name: ModeState, onClose?: () => {}): Promise<void>;
}

Methods

  • This method will return the currently available modes considering the site's state (published or draft).

    Returns ModeState[]

    Array list of modeState names.

  • Switch to given mode if authorized. Closes current mode and related toolbox.

    Parameters

    • name: ModeState

      The mode to switch to

    • OptionalonClose: () => {}

      Callback when the mode is closed

    Returns Promise<void>