diff --git a/src/Umbraco.Core/Trees/MenuItemList.cs b/src/Umbraco.Core/Trees/MenuItemList.cs index 7ba2bae0f8..de926d54d8 100644 --- a/src/Umbraco.Core/Trees/MenuItemList.cs +++ b/src/Umbraco.Core/Trees/MenuItemList.cs @@ -24,6 +24,17 @@ public class MenuItemList : List : base(items) => _actionCollection = actionCollection; + /// + /// Adds a menu item with a dictionary which is merged to the AdditionalData bag + /// + /// + /// + /// The used to localize the action name based on its alias + /// Whether or not this action opens a dialog + /// Whether or not this action should use legacy icon prefixed with "icon-" or full icon name is specified. + public MenuItem? Add(ILocalizedTextService textService, bool hasSeparator = false, bool opensDialog = false) + where T : IAction => Add(textService, hasSeparator, opensDialog, useLegacyIcon: true); + /// /// Adds a menu item with a dictionary which is merged to the AdditionalData bag /// @@ -35,7 +46,7 @@ public class MenuItemList : List public MenuItem? Add(ILocalizedTextService textService, bool hasSeparator = false, bool opensDialog = false, bool useLegacyIcon = true) where T : IAction { - var item = CreateMenuItem(textService, hasSeparator, opensDialog); + MenuItem? item = CreateMenuItem(textService, hasSeparator, opensDialog, useLegacyIcon); if (item != null) { Add(item);