Feed extends BaseObject
Table of Contents
Constants
- ERROR_PARAMS_ENTITY_ID = 'params0003'
- ERROR_PARAMS_FORUM_ID = 'params0001'
- ERROR_PARAMS_MESSAGE = 'params0004'
- ERROR_PARAMS_TOPIC_ID = 'params0002'
- ERROR_PERMISSION = 'params0005'
Methods
- __construct() : mixed
- add() : array<string|int, mixed>|bool
- Add a comment like from a person
- addComment() : array<string|int, mixed>|null
- Add a comment in general
- addServiceComment() : array<string|int, mixed>|null
- canAdd() : bool
- Returns true if entity allows adding
- canDelete() : bool
- Returns true if entity allows deleting.
- canDeleteComment() : bool
- canEdit() : bool
- Returns true if entity allows editing
- canEditComment() : bool
- canEditOwn() : bool
- canModerate() : bool
- canRead() : bool
- Returns true if entity allows reading
- delete() : array<string|int, mixed>|bool
- Delete a comment
- edit() : array<string|int, mixed>|bool
- Edit a comment
- getApplication() : CMain
- 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
- getPermission() : string
- Returns permission From list: A < E < I < M < Q < U < Y.
- getTopic() : array<string|int, mixed>
- Returns forum topic
- getUser() : User
- getUserUnreadMessageId() : mixed
- hasErrors() : bool
- moderate() : array<string|int, mixed>|bool
- Moderate comment with id
- moveEventCommentsToNewXmlId() : bool
- send() : bool
- Render comment through the component and send into pull
- setEditOwn() : $this
- setForumFields() : $this
- Redefines forum params
- setPermission() : $this
- Mainly this function for forum entity. In this case params have to from the list: A < E < I < M < Q < U < Y A - NO ACCESS E - READ I - ANSWER M - NEW TOPIC Q - MODERATE U - EDIT Y - FULL_ACCESS
- setUserAsRead() : mixed
- setUserLocation() : mixed
Constants
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
= 'params0004'
ERROR_PARAMS_TOPIC_ID
public
mixed
ERROR_PARAMS_TOPIC_ID
= 'params0002'
ERROR_PERMISSION
public
mixed
ERROR_PERMISSION
= 'params0005'
Methods
__construct()
public
__construct(mixed $forumId, mixed $entity[, mixed $userId = null ]) : mixed
Parameters
- $forumId : mixed
- $entity : mixed
- $userId : mixed = null
add()
Add a comment like from a person
public
add(array<string|int, mixed> $params) : array<string|int, mixed>|bool
Parameters
- $params : array<string|int, mixed>
-
Fields for new message to add in table b_forum_message.
Return values
array<string|int, mixed>|booladdComment()
Add a comment in general
public
addComment(array<string|int, mixed> $params) : array<string|int, mixed>|null
Parameters
- $params : array<string|int, mixed>
-
Fields for new message to add in table b_forum_message.
Return values
array<string|int, mixed>|nulladdServiceComment()
public
addServiceComment(array<string|int, mixed> $data[, int $serviceType = ServiceManager::TYPE_FORUM_DEFAULT ][, array<string|int, mixed>|null $serviceData = null ]) : array<string|int, mixed>|null
Parameters
- $data : array<string|int, mixed>
- $serviceType : int = ServiceManager::TYPE_FORUM_DEFAULT
- $serviceData : array<string|int, mixed>|null = null
Return values
array<string|int, mixed>|nullcanAdd()
Returns true if entity allows adding
public
canAdd() : bool
Return values
boolcanDelete()
Returns true if entity allows deleting.
public
canDelete() : bool
Return values
boolcanDeleteComment()
public
canDeleteComment(int $commentId) : bool
Parameters
- $commentId : int
-
Message ID in b_forum_message to delete.
Return values
boolcanEdit()
Returns true if entity allows editing
public
canEdit() : bool
Return values
boolcanEditComment()
public
canEditComment(int $commentId) : bool
Parameters
- $commentId : int
-
Message ID in b_forum_message to edit.
Return values
boolcanEditOwn()
public
canEditOwn() : bool
Return values
boolcanModerate()
public
canModerate() : bool
Return values
boolcanRead()
Returns true if entity allows reading
public
canRead() : bool
Return values
booldelete()
Delete a comment
public
delete(int $id) : array<string|int, mixed>|bool
Parameters
- $id : int
-
Message id.
Return values
array<string|int, mixed>|booledit()
Edit a comment
public
edit(int $id, array<string|int, mixed> $params) : array<string|int, mixed>|bool
Parameters
- $id : int
-
Message id.
- $params : array<string|int, mixed>
-
Fields to edit message.
Return values
array<string|int, mixed>|boolgetApplication()
public
getApplication() : CMain
Return values
CMaingetEntity()
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>getPermission()
Returns permission From list: A < E < I < M < Q < U < Y.
public
getPermission() : string
Return values
stringgetTopic()
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()
Moderate comment with id
public
moderate(int $id, bool $show) : array<string|int, mixed>|bool
Parameters
- $id : int
-
Message id.
- $show : bool
-
State for moderating: true - show, false - hide.
Return values
array<string|int, mixed>|boolmoveEventCommentsToNewXmlId()
public
moveEventCommentsToNewXmlId(string $newEntityXmlId) : bool
Parameters
- $newEntityXmlId : string
Return values
boolsend()
Render comment through the component and send into pull
public
send(int $id, array<string|int, mixed> $params) : bool
Parameters
- $id : int
-
Message id.
- $params : array<string|int, mixed>
-
Params for component including.
Return values
boolsetEditOwn()
public
setEditOwn(bool $allow) : $this
Parameters
- $allow : bool
-
True or false.
Return values
$thissetForumFields()
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
$thissetPermission()
Mainly this function for forum entity. In this case params have to from the list: A < E < I < M < Q < U < Y A - NO ACCESS E - READ I - ANSWER M - NEW TOPIC Q - MODERATE U - EDIT Y - FULL_ACCESS
public
setPermission(string $permission) : $this
Parameters
- $permission : string
-
A,E,I,M,Q,U,Y.
Return values
$thissetUserAsRead()
public
setUserAsRead() : mixed
setUserLocation()
public
setUserLocation() : mixed