replace

abstract fun replace(old: MenuItemConfig, new: Pair<MenuItemConfig, FrontendConfig>)

Replaces old menu item with new.

new associates a menu item with a frontend.

The given old menu item must have been configured already.