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); } }
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(); }
public ComposerFunctionUpdater() { _functions = ReflectionHelper.GetTypesWithAttribute(typeof(FunctionTypeAttribute)).ToList(); _contentTypes = PageTypeHelper.GetPageTypes(ContentFunctionTypeManager.List()); _pageTypes = PageTypeManager.List(); }