View Source
Class ContentServiceExtensions
Content service extension methods
Assembly: Umbraco.Core.dll
Syntax
public static class ContentServiceExtensions
Methods
View Source
CreateContent(IContentService, string, Udi, string, int)
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 |
|
| string |
name |
|
| Udi |
parentId |
|
| string |
contentTypeAlias |
|
| int |
userId |
|
Returns
View Source
GetAnchorValuesFromRTEContent(IContentService, string)
Declaration
public static IEnumerable<string> GetAnchorValuesFromRTEContent(this IContentService contentService, string rteContent)
Parameters
Returns
| Type |
Description |
| IEnumerable<string> |
|
View Source
GetAnchorValuesFromRTEs(IContentService, int, string?)
Declaration
public static IEnumerable<string> GetAnchorValuesFromRTEs(this IContentService contentService, int id, string? culture = "*")
Parameters
Returns
| Type |
Description |
| IEnumerable<string> |
|
View Source
GetByIds(IContentService, IEnumerable<Udi>)
Declaration
public static IEnumerable<IContent> GetByIds(this IContentService contentService, IEnumerable<Udi> ids)
Parameters
Returns
View Source
RemoveContentPermissions(IContentService, int)
Remove all permissions for this user for all nodes
Declaration
public static void RemoveContentPermissions(this IContentService contentService, int contentId)
Parameters