Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        // 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);
        }
Exemplo n.º 3
0
        public CmsConfig AddDashboardSection(Type customDashboardSectionType)
        {
            CustomDashboardSectionRegistrations.Add(new CustomTypeRegistration(customDashboardSectionType));

            return(this);
        }