Interface ITaxonomyManager
- Namespace
- CMS.ContentEngine
- Assembly
- CMS.ContentEngine.dll
Manager for taxonomy operations.
public interface ITaxonomyManager
- Extension Methods
Methods
DeleteTag(int, CancellationToken)
Deletes a tag including all children tags.
Task DeleteTag(int tagId, CancellationToken cancellationToken = default)
Parameters
tagIdintTag ID.
cancellationTokenCancellationTokenCancellation instruction.
Returns
- Task
DeleteTaxonomy(int, CancellationToken)
Deletes taxonomy with all tags if it is not used.
Task<bool> DeleteTaxonomy(int taxonomyId, CancellationToken cancellationToken = default)
Parameters
taxonomyIdintTaxonomy ID.
cancellationTokenCancellationTokenCancellation instruction.
Returns
- Task<bool>
True when deleted or taxonomy does not exist, false when taxonomy is in use.
MoveTag(int, int, int, CancellationToken)
Moves a tag to a new parent tag.
Task MoveTag(int tagId, int targetParentTagId, int order, CancellationToken cancellationToken = default)
Parameters
tagIdintTag identifier.
targetParentTagIdintTarget parent tag identifier.
orderintNew order of the tag.
cancellationTokenCancellationTokenCancellation instruction.
Returns
- Task
Remarks
If the tag should be moved under the root the targetParentTagId should be 0.