This interface provides support for liking content and defines the methods needed to secure likes.
ILikeableContentType is defined in the Telligent.Evolution.Extensibility.Content.Version1 namespace of Telligent.Evolution.Platform.dll
Definition
interface ILikeableContentType : IContentType, IPlugin { bool SupportsLikes { get; } bool CanLike(Guid contentId, int userId); bool CanUnlike(Guid contentId, int userId); }
Properties
| Name | Type | Description | Default | Options |
|---|---|---|---|---|
| SupportsLikes | bool | Returns whether any content of this content type can be liked |
Methods
bool CanLike(Guid contentId, int userId);
Returns whether the user can like the given content.
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| contentId | Guid | Content Id | Required | ||
| userId | int | User Id | Required |
Return Type
bool
bool CanUnlike(Guid contentId, int userId);
Returns whether the user can unlike the given content.
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| contentId | Guid | Content Id | Required | ||
| userId | int | User Id | Required |
Return Type
bool