C# Class ToSic.SexyContent.ContentGroup

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

Public Methods

Method Description
AddContentAndPresentationEntity ( string type, int sortOrder, int contentId, int presentationId ) : void

If SortOrder is not specified, adds at the end

ContentGroup ( System.Guid previewTemplateId, int zoneId, int appId ) : System

Instanciate a "temporary" ContentGroup with the specified templateId and no Content items

ContentGroup ( IEntity contentGroupEntity, int zoneId, int appId ) : System
ListWithNulls ( string type ) : List
RemoveContentAndPresentationEntities ( string type, int sortOrder ) : void

Removes entities from a group. This will also remove the corresponding presentation entities.

ReorderAll ( int newSequence ) : bool
ReorderEntities ( int sortOrder, int destinationSortOrder ) : void
UpdateEntityIfChanged ( string type, int sortOrder, int entityId, bool updatePresentation, int presentationId ) : void
UpdateTemplate ( int templateId ) : void
this ( string type ) : List

Private Methods

Method Description
GetPresentationIdWithSameLengthAsContent ( ) : List
PrepareSavePackage ( string type, IEnumerable entityIds, int?[]>.Dictionary alreadyInitializedDictionary = null ) : int?[]>.Dictionary
ReCapitalizePartName ( string partName ) : string
SaveChangedLists ( int?[]>.Dictionary values ) : void

Method Details

AddContentAndPresentationEntity() public method

If SortOrder is not specified, adds at the end
public AddContentAndPresentationEntity ( string type, int sortOrder, int contentId, int presentationId ) : void
type string
sortOrder int
contentId int
presentationId int
return void

ContentGroup() public method

Instanciate a "temporary" ContentGroup with the specified templateId and no Content items
public ContentGroup ( System.Guid previewTemplateId, int zoneId, int appId ) : System
previewTemplateId System.Guid
zoneId int
appId int
return System

ContentGroup() public method

public ContentGroup ( IEntity contentGroupEntity, int zoneId, int appId ) : System
contentGroupEntity IEntity
zoneId int
appId int
return System

ListWithNulls() public method

public ListWithNulls ( string type ) : List
type string
return List

RemoveContentAndPresentationEntities() public method

Removes entities from a group. This will also remove the corresponding presentation entities.
public RemoveContentAndPresentationEntities ( string type, int sortOrder ) : void
type string Should be 'Content' or "ListContent"
sortOrder int
return void

ReorderAll() public method

public ReorderAll ( int newSequence ) : bool
newSequence int
return bool

ReorderEntities() public method

public ReorderEntities ( int sortOrder, int destinationSortOrder ) : void
sortOrder int
destinationSortOrder int
return void

UpdateEntityIfChanged() public method

public UpdateEntityIfChanged ( string type, int sortOrder, int entityId, bool updatePresentation, int presentationId ) : void
type string
sortOrder int
entityId int
updatePresentation bool
presentationId int
return void

UpdateTemplate() public method

public UpdateTemplate ( int templateId ) : void
templateId int
return void

this() public method

public this ( string type ) : List
type string
return List