Comment extends BaseObject
Table of Contents
Constants
- ERROR_MESSAGE_IS_NULL = 'params0008'
- ERROR_PARAMS_ENTITY_ID = 'params0003'
- ERROR_PARAMS_FORUM_ID = 'params0001'
- ERROR_PARAMS_MESSAGE = 'params0006'
- ERROR_PARAMS_TOPIC_ID = 'params0002'
- ERROR_PARAMS_TYPE = 'params0009'
- ERROR_PERMISSION = 'params0007'
Methods
- __construct() : mixed
- add() : array<string|int, mixed>|false
- Adds new comment
- appendUserFields() : static
- canDelete() : bool
- canEdit() : mixed
- canEditOwn() : bool
- create() : Comment
- Creates new
- createFromId() : Comment
- Creates new
- delete() : mixed
- edit() : array<string|int, mixed>|false
- Edit new comment
- getApplication() : CMain
- getComment() : mixed
- getEntity() : Entity
- Returns entity which manage all rights. For example forum topic or task
- getErrors() : array<string|int, mixed>
- getForum() : array<string|int, mixed>
- Returns forum
- getTopic() : array<string|int, mixed>
- Returns forum topic
- getUser() : User
- getUserUnreadMessageId() : mixed
- hasErrors() : bool
- moderate() : mixed
- setComment() : mixed
- setForumFields() : $this
- Redefines forum params
- setUserAsRead() : mixed
- setUserLocation() : mixed
Constants
ERROR_MESSAGE_IS_NULL
public
mixed
ERROR_MESSAGE_IS_NULL
= 'params0008'
ERROR_PARAMS_ENTITY_ID
public
mixed
ERROR_PARAMS_ENTITY_ID
= 'params0003'
ERROR_PARAMS_FORUM_ID
public
mixed
ERROR_PARAMS_FORUM_ID
= 'params0001'
ERROR_PARAMS_MESSAGE
public
mixed
ERROR_PARAMS_MESSAGE
= 'params0006'
ERROR_PARAMS_TOPIC_ID
public
mixed
ERROR_PARAMS_TOPIC_ID
= 'params0002'
ERROR_PARAMS_TYPE
public
mixed
ERROR_PARAMS_TYPE
= 'params0009'
ERROR_PERMISSION
public
mixed
ERROR_PERMISSION
= 'params0007'
Methods
__construct()
public
__construct(mixed $forumId, mixed $entity[, mixed $userId = null ]) : mixed
Parameters
- $forumId : mixed
- $entity : mixed
- $userId : mixed = null
add()
Adds new comment
public
add(array<string|int, mixed> $params) : array<string|int, mixed>|false
Parameters
- $params : array<string|int, mixed>
Return values
array<string|int, mixed>|falseappendUserFields()
public
appendUserFields(array<string|int, mixed> &$params) : static
Parameters
- $params : array<string|int, mixed>
Return values
staticcanDelete()
public
canDelete() : bool
Return values
boolcanEdit()
public
canEdit() : mixed
canEditOwn()
public
canEditOwn() : bool
Return values
boolcreate()
Creates new
public
static create(Feed $feed) : Comment
Parameters
- $feed : Feed
Return values
CommentcreateFromId()
Creates new
public
static createFromId(Feed $feed, mixed $id) : Comment
Parameters
- $feed : Feed
- $id : mixed
Return values
Commentdelete()
public
delete() : mixed
edit()
Edit new comment
public
edit(array<string|int, mixed> $params) : array<string|int, mixed>|false
Parameters
- $params : array<string|int, mixed>
Return values
array<string|int, mixed>|falsegetApplication()
public
getApplication() : CMain
Return values
CMaingetComment()
public
getComment() : mixed
getEntity()
Returns entity which manage all rights. For example forum topic or task
public
getEntity() : Entity
Return values
EntitygetErrors()
public
getErrors() : array<string|int, mixed>
Return values
array<string|int, mixed>getForum()
Returns forum
public
getForum() : array<string|int, mixed>
Return values
array<string|int, mixed>getTopic()
Returns forum topic
public
getTopic() : array<string|int, mixed>
Return values
array<string|int, mixed>getUser()
public
getUser() : User
Return values
UsergetUserUnreadMessageId()
public
getUserUnreadMessageId() : mixed
hasErrors()
public
hasErrors() : bool
Return values
boolmoderate()
public
moderate(mixed $show) : mixed
Parameters
- $show : mixed
setComment()
public
setComment(mixed $id) : mixed
Parameters
- $id : mixed
setForumFields()
Redefines forum params
public
setForumFields(array<string|int, mixed> $params) : $this
Parameters
- $params : array<string|int, mixed>
-
Array(key=>value, key2=>value2) of fields to redefine forum fields.
Return values
$thissetUserAsRead()
public
setUserAsRead() : mixed
setUserLocation()
public
setUserLocation() : mixed