Plentymarkets interface documentation
Comment
Contracts
CommentRepositoryContract
Get, create, update and delete comments.
Namespace
Plenty\Modules\Comment\Contracts
Methods
public getComment($commentId):Plenty\Modules\Comment\Models\Comment
Return type: Comment
Get a comment
Name |
Type |
Description |
|
The ID of the comment |
public listComments($with = []):Illuminate\Support\Collection
Return type: Collection
List comments
Name |
Type |
Description |
|
public createComment($data, $suppressEvent = false):Plenty\Modules\Comment\Models\Comment
Return type: Comment
Create a comment
Name |
Type |
Description |
|
The request data |
|
|
Whether to suppress the created event or not. |
public deleteComment($commentId):void
Delete a comment
Name |
Type |
Description |
|
The ID of the comment |
public updateComment($data, $commentId):Plenty\Modules\Comment\Models\Comment
Return type: Comment
Update a comment
Name |
Type |
Description |
|
||
|
public clearCriteria():void
Resets all Criteria filters by creating a new instance of the builder object.
public applyCriteriaFromFilters():void
Applies criteria classes to the current repository.
public setFilters($filters = []):void
Sets the filter array.
Name |
Type |
Description |
|
public getFilters():void
Returns the filter array.
public getConditions():void
Returns a collection of parsed filters as Condition object
public clearFilters():void
Clears the filter array.
Models
Comment
The comment model can be one of the following types: category, contact, order, item_variation, order_item, specified by the referenceType.
Namespace
Plenty\Modules\Comment\Models
Name | Type | Description |
---|---|---|
id |
The ID of the comment |
|
referenceType |
The reference type. Valid types are: <ul> <li>category</li> <li>contact</li> <li>order</li> <li>item_variation</li> <li>order_item</li> </ul> |
|
referenceValue |
The reference value |
|
userId |
The ID of the user |
|
createdAt |
The date when the comment was created |
|
text |
The comment text |
|
isVisibleForContact |
If true, the comment is visible for the associated contact. |
Methods
public toArray()
Returns this model as an array.