C# Class ToSic.SexyContent.ContentGroupManager

Show file Open project: 2sic/2sxc Class Usage Examples

Public Methods

Method Description
ContentGroupManager ( int zoneId, int appId ) : System
CreateNewContentGroup ( int templateId ) : System.Guid
DeletePreviewTemplateId ( int moduleId ) : void
GetContentGroup ( System.Guid contentGroupGuid ) : ContentGroup
GetContentGroupForModule ( int moduleId ) : ContentGroup
GetContentGroups ( ) : IEnumerable
IsConfigurationInUse ( int templateId, string type ) : bool
SetModulePreviewTemplateId ( int moduleId, System.Guid previewTemplateGuid ) : void

Saves a temporary templateId to the module's settings This templateId will be used until a contentgroup exists

UpdateOrCreateContentGroup ( ContentGroup contentGroup, int templateId ) : System.Guid

Private Methods

Method Description
ContentGroupSource ( ) : IDataSource
GetContentGroupOrGeneratePreview ( System.Guid groupGuid, System.Guid previewTemplateGuid ) : ContentGroup
PersistContentGroupAndBlankTemplateToModule ( int moduleId, bool wasCreated, System.Guid guid ) : void

Method Details

ContentGroupManager() public method

public ContentGroupManager ( int zoneId, int appId ) : System
zoneId int
appId int
return System

CreateNewContentGroup() public method

public CreateNewContentGroup ( int templateId ) : System.Guid
templateId int
return System.Guid

DeletePreviewTemplateId() public static method

public static DeletePreviewTemplateId ( int moduleId ) : void
moduleId int
return void

GetContentGroup() public method

public GetContentGroup ( System.Guid contentGroupGuid ) : ContentGroup
contentGroupGuid System.Guid
return ContentGroup

GetContentGroupForModule() public method

public GetContentGroupForModule ( int moduleId ) : ContentGroup
moduleId int
return ContentGroup

GetContentGroups() public method

public GetContentGroups ( ) : IEnumerable
return IEnumerable

IsConfigurationInUse() public method

public IsConfigurationInUse ( int templateId, string type ) : bool
templateId int
type string
return bool

SetModulePreviewTemplateId() public method

Saves a temporary templateId to the module's settings This templateId will be used until a contentgroup exists
public SetModulePreviewTemplateId ( int moduleId, System.Guid previewTemplateGuid ) : void
moduleId int
previewTemplateGuid System.Guid
return void

UpdateOrCreateContentGroup() public method

public UpdateOrCreateContentGroup ( ContentGroup contentGroup, int templateId ) : System.Guid
contentGroup ContentGroup
templateId int
return System.Guid