public static void ConvertToExtensionPageType(int pageTypeID, bool updateSortOrder)
        {
            var pageType = PageType.Load(pageTypeID);

            if (!PageTypeManager.IsExtensionPageType(pageType))
            {
                PageTypeHelper.AddExtensionPageProperty(pageType);

                if (updateSortOrder)
                {
                    var source = PageTypeManager.List();
                    if ((source != null) && (source.Count > 0))
                    {
                        pageType.SortOrder = source.Last().SortOrder + 10;
                    }
                }

                pageType.IsAvailable = true;
                pageType.Save();

                //private methods for access and rules
                PageTypeHelper.SetDefaultAccessPageType(pageType.ID);
                PageTypeHelper.SetDefaultRulePageType(pageType.ID);
            }
        }
예제 #2
0
 public ComposerFunctionUpdater()
 {
     _functions        = ReflectionHelper.GetTypesWithAttribute(typeof(FunctionTypeAttribute)).ToList();
     _contentTypes     = PageTypeHelper.GetPageTypes(ContentFunctionTypeManager.List());
     _pageTypes        = PageTypeManager.List().Select(p => new WrappedPageType(p)).ToList();
     RulesTimer        = new System.Diagnostics.Stopwatch();
     AccessTimer       = new System.Diagnostics.Stopwatch();
     ContentAreasTimer = new System.Diagnostics.Stopwatch();
 }
예제 #3
0
 public ComposerFunctionUpdater()
 {
     _functions    = ReflectionHelper.GetTypesWithAttribute(typeof(FunctionTypeAttribute)).ToList();
     _contentTypes = PageTypeHelper.GetPageTypes(ContentFunctionTypeManager.List());
     _pageTypes    = PageTypeManager.List();
 }