public PageDefinitionCollection List(int pageTypeId) { var result = new PageDefinitionCollection(); result.AddRange(MapRecordsToExposedObjects(pageDefinitions.Where(pd => pd.PageTypeID == pageTypeId))); return(result); }
private FakePageType GetPageTypeToReturn(IPageType pageTypeRecord) { var definitions = new PageDefinitionCollection(); definitions.AddRange(pageDefinitionFactory.List(pageTypeRecord.ID)); var pageTypeToReturn = new FakePageType(definitions); Mapper.Map(pageTypeRecord, pageTypeToReturn); return pageTypeToReturn; }
public FakePageType(PageDefinitionCollection pageDefinitions) { var template = new PageType(); AllowedPageTypes = template.AllowedPageTypes; DefaultArchivePageLink = template.DefaultArchivePageLink; DefaultChildOrderRule = template.DefaultChildOrderRule; DefaultPageName = template.DefaultPageName; DefaultPeerOrder = template.DefaultPeerOrder; DefaultStartPublishOffset = template.DefaultStartPublishOffset; DefaultStopPublishOffset = template.DefaultStopPublishOffset; DefaultVisibleInMenu = template.DefaultVisibleInMenu; Definitions = pageDefinitions; Description = template.Description; IsAvailable = template.IsAvailable; Name = template.Name; SortOrder = template.SortOrder; Defaults = new PageTypeDefault(); }
public PageDefinitionCollection List(int pageTypeId) { var result = new PageDefinitionCollection(); result.AddRange(MapRecordsToExposedObjects(pageDefinitions.Where(pd => pd.PageTypeID == pageTypeId))); return result; }