Post
Table of Contents
Methods
- buildPreview() : string
- Returns HTML code for blog post preview.
- checkUserReadAccess() : bool
- Returns true if current user has read access to the blog post.
- getImAttach() : CIMMessageParamAttach|false
- Returns attach to display in the messenger.
- getImRich() : mixed
Methods
buildPreview()
Returns HTML code for blog post preview.
public
static buildPreview(array<string|int, mixed> $params) : string
Parameters
- $params : array<string|int, mixed>
-
Expected keys: postId, userId.
Return values
stringcheckUserReadAccess()
Returns true if current user has read access to the blog post.
public
static checkUserReadAccess(array<string|int, mixed> $params, int $userId) : bool
Parameters
- $params : array<string|int, mixed>
-
Allowed keys: postId, userId.
- $userId : int
-
Current user's id.
Return values
boolgetImAttach()
Returns attach to display in the messenger.
public
static getImAttach(array<string|int, mixed> $params) : CIMMessageParamAttach|false
Parameters
- $params : array<string|int, mixed>
-
Expected keys: postId, userId
Return values
CIMMessageParamAttach|falsegetImRich()
public
static getImRich(array<string|int, mixed> $params) : mixed
Parameters
- $params : array<string|int, mixed>