View Source
Class ContentServiceExtensions
Content service extension methods
Inheritance
System.Object
Assembly: Umbraco.Core.dll
Syntax
public static class ContentServiceExtensions
Methods
View Source
CreateContent(IContentService, String, Udi, String, Int32)
Method to create an IContent object based on the Udi of a parent
Declaration
public static IContent CreateContent(this IContentService contentService, string name, Udi parentId, string contentTypeAlias, int userId = -1)
Parameters
Type |
Name |
Description |
IContentService |
contentService |
|
System.String |
name |
|
Udi |
parentId |
|
System.String |
contentTypeAlias |
|
System.Int32 |
userId |
|
Returns
View Source
GetAnchorValuesFromRTEContent(IContentService, String)
Declaration
public static IEnumerable<string> GetAnchorValuesFromRTEContent(this IContentService contentService, string rteContent)
Parameters
Type |
Name |
Description |
IContentService |
contentService |
|
System.String |
rteContent |
|
Returns
Type |
Description |
IEnumerable<System.String> |
|
View Source
GetAnchorValuesFromRTEs(IContentService, Int32, String)
Declaration
public static IEnumerable<string> GetAnchorValuesFromRTEs(this IContentService contentService, int id, string culture = "*")
Parameters
Type |
Name |
Description |
IContentService |
contentService |
|
System.Int32 |
id |
|
System.String |
culture |
|
Returns
Type |
Description |
IEnumerable<System.String> |
|
View Source
GetByIds(IContentService, IEnumerable<Udi>)
Declaration
public static IEnumerable<IContent>? GetByIds(this IContentService contentService, IEnumerable<Udi> ids)
Parameters
Returns
Type |
Description |
System.Nullable<IEnumerable<IContent>> |
|
View Source
RemoveContentPermissions(IContentService, Int32)
Remove all permissions for this user for all nodes
Declaration
public static void RemoveContentPermissions(this IContentService contentService, int contentId)
Parameters
Type |
Name |
Description |
IContentService |
contentService |
|
System.Int32 |
contentId |
|