prepareMenuItemsForRequest()

Overview

public array function prepareMenuItemsForRequest(
      required array  menuItems     
    ,          string legacyViewBase = "/admin/layout/sidebar/"
)

Main entry point. Prepares menu items ready for rendering for the current request/user.

Arguments

NameTypeRequiredDescription
menuItemsarrayYesArray of top level menu items
legacyViewBasestringNo (default="/admin/layout/sidebar/")Base view path to be used for menu backward compatibility. e.g. for default Preside admin sidebar menu, this is /admin/layout/sidebar/{itemid}