Lombiq Helpful Libraries - Orchard Core Libraries - Contents for Orchard Core
December 26, 2023 ยท View on GitHub
Constants
CommonContentDisplayTypes: Has constants for values that can be used withIContentItemDisplayManager.BuildDisplayAsync()orOrchardRazorHelperExtensions.DisplayAsync()to safely select the correct display type.CommonStereotypes: Constants for commonly used content stereotypes.
Extensions
ContentDefinitionManagerExtensions: Adds extension methods to easily fetch settings objects fromContentTypePartDefinitionobjects.ContentEnumerableExtensions: Adds an extension for selecting parts in a collection of contents.ContentExtensions: AddsContentItemmanipulating extension methods toIContentobjects, including the same ones that are available for theContentItemobjects (e.g.As<T>()orWeld<T>()).ContentFieldEditorEnums: Adds enums with the name of ContentField editors.ContentHttpContextExtensions: AddsIContentsession related extension methods toHttpContext.ContentOrchardHelperExtensions: Extensions for managing content items better viaIOrchardHelper.ContentManagerExtensions: Adds extension methods for retrieving, loading or creating content using theIContentManagerinterface.ContentManagerSessionExtensions: Uses theIContentManagerSessionscoped cache around anyContentItemquery done outsideIContentManager.ContentTypeDefinitionBuilderExtensions: Adds extension methods for configuring the content type definition viaContentTypeDefinitionBuilder.ContentPartDefinitionBuilderExtensions: Adds extension methods for configuring the content part definition viaContentPartDefinitionBuilder.ContentVersionNumberServiceExtensions: Adds extension methods for retrievingIContentversion numbers toIContentVersionNumberService.IdStringExtensions: Adds extension methods relating to content item ID generation.
Helpers
ContentExceptionHelpers: Using these helpers, arguments can be tested without writingifstatements, for example to check if theContentItemhas the given part attached to it.
Services
IContentVersionNumberService: Service for getting content version number based on how many different versions of it are in the document database. It has a method for getting the version number of the latest version (GetLatestVersionNumberAsync()) and another one for a specific content version ID (GetCurrentVersionNumberAsync()).ITaxonomyHelper: Taxonomy-related helper methods.