public ICmsConfig AddDashboardSection(Type customDashboardSectionType) { if (!customDashboardSectionType.IsSameTypeOrDerivedFrom(typeof(ComponentBase))) { throw new InvalidOperationException($"{nameof(customDashboardSectionType)} must be derived of {nameof(ComponentBase)}."); } CustomDashboardSectionRegistrations.Add(new CustomTypeRegistration(customDashboardSectionType)); return(this); }
// TODO: this should throw if collection does not implement its edit or list view public CmsConfig AddDashboardSection(string collectionAlias, bool edit = false) { CustomDashboardSectionRegistrations.Add( new CustomTypeRegistration( typeof(Collection), new Dictionary <string, string> { { "Action", edit ? Constants.Edit : Constants.List }, { "CollectionAlias", collectionAlias } })); return(this); }
public CmsConfig AddDashboardSection(Type customDashboardSectionType) { CustomDashboardSectionRegistrations.Add(new CustomTypeRegistration(customDashboardSectionType)); return(this); }