Class ContentServiceExtensions
Content service extension methods
Inheritance
System.Object
Namespace:System.Dynamic.ExpandoObject
Assembly:Umbraco.Core.dll
Syntax
public static class ContentServiceExtensions
Methods
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 mediaTypeAlias, int userId = 0)
Parameters
Type |
Name |
Description |
IContentService |
contentService |
|
System.String |
name |
|
Udi |
parentId |
|
System.String |
mediaTypeAlias |
|
System.Int32 |
userId |
|
Returns
GetByIds(IContentService, IEnumerable<Udi>)
Declaration
public static IEnumerable<IContent> GetByIds(this IContentService contentService, IEnumerable<Udi> ids)
Parameters
Type |
Name |
Description |
IContentService |
contentService |
|
System.Collections.Generic.IEnumerable<Udi> |
ids |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<IContent> |
|
RecycleBinSmells(IContentService)
Returns true if there is any content in the recycle bin
Declaration
public static bool RecycleBinSmells(this IContentService contentService)
Parameters
Returns
Type |
Description |
System.Boolean |
|
RecycleBinSmells(IMediaService)
Returns true if there is any media in the recycle bin
Declaration
public static bool RecycleBinSmells(this IMediaService mediaService)
Parameters
Returns
Type |
Description |
System.Boolean |
|
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 |
|