Plentymarkets interface documentation

Feedback

Contracts

FeedbackAverageRepositoryContract

Get the feedback average.

Namespace

Plenty\Modules\Feedback\Contracts

Methods
public getFeedbackAverage($feedbackRelationTargetId):void

Gets the feedback average

Parameters

Name

Type

Description

$feedbackRelationTargetId

int

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.

Parameters

Name

Type

Description

$filters

array

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.

FeedbackCommentRepositoryContract

Get, create and delete feedback comments.

Namespace

Plenty\Modules\Feedback\Contracts

Methods
public getFeedbackComment($feedbackCommentId):Plenty\Modules\Feedback\Models\FeedbackComment
Return type: FeedbackComment

Get a feedback comment

Parameters

Name

Type

Description

$feedbackCommentId

int

The ID of the feedback comment

public listFeedbackComments():Illuminate\Support\Collection
Return type: Collection

List feedback comments

public createFeedbackComment($data):Plenty\Modules\Feedback\Models\FeedbackComment
Return type: FeedbackComment

Create a feedback comment

Parameters

Name

Type

Description

$data

array

The request data

public deleteFeedbackComment($feedbackCommentId):void

Delete a feedback comment

Parameters

Name

Type

Description

$feedbackCommentId

int

The ID of the feedback comment

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.

Parameters

Name

Type

Description

$filters

array

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.

FeedbackRatingRepositoryContract

Get, create and delete feedback ratings.

Namespace

Plenty\Modules\Feedback\Contracts

Methods
public getFeedbackRating($feedbackRatingId):Plenty\Modules\Feedback\Models\FeedbackRating
Return type: FeedbackRating

Get a feedback rating

Parameters

Name

Type

Description

$feedbackRatingId

int

The ID of the feedback rating

public listFeedbackRatings():Illuminate\Support\Collection
Return type: Collection

List feedback ratings

public createFeedbackRating($data):Plenty\Modules\Feedback\Models\FeedbackRating
Return type: FeedbackRating

Create a feedback rating

Parameters

Name

Type

Description

$data

array

The request data

public deleteFeedbackRating($feedbackRatingId):void

Delete a feedback rating

Parameters

Name

Type

Description

$feedbackRatingId

int

The ID of the feedback rating

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.

Parameters

Name

Type

Description

$filters

array

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.

FeedbackRepositoryContract

Get, create and delete feedbacks.

Namespace

Plenty\Modules\Feedback\Contracts

Methods
public getFeedback($feedbackId):void

Get a feedback

Parameters

Name

Type

Description

$feedbackId

int

The ID of the feedback

public listFeedbacks($page = 1, $itemsPerPage = 50, $with = [], $filters = []):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult

Get a list of feedbacks

Parameters

Name

Type

Description

$page

int

$itemsPerPage

int

$with

array

$filters

array

public createFeedback($data):void

Create a feedback

Parameters

Name

Type

Description

$data

array

The request data

public deleteFeedback($feedbackId):void

Delete a feedback

Parameters

Name

Type

Description

$feedbackId

int

The ID of the feedback

public updateFeedback($data, $feedbackId):void

Update a feedback

Parameters

Name

Type

Description

$data

array

Request data

$feedbackId

int

The ID of the feedback

public updateFeedbacksVisibility($feedbackIds, $isVisible):void

Update the visibility of multiple feedbacks

Parameters

Name

Type

Description

$feedbackIds

array

$isVisible

bool

public deleteFeedbacks($feedbackIds):void

Delete multiple feedbacks

Parameters

Name

Type

Description

$feedbackIds

string

public listFeedbackReplies($feedbackId, $page = 1, $itemsPerPage = 50, $with = [], $filters = []):void

Lists feedback replies

Parameters

Name

Type

Description

$feedbackId

int

$page

int

$itemsPerPage

int

$with

array

$filters

array

public migrateLegacyFeedbacks():void

Migrate legacy feedbacks

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.

Parameters

Name

Type

Description

$filters

array

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

Feedback

The feedback model.

Namespace

Plenty\Modules\Feedback\Models

Properties
Name Type Description

id

int

The ID of the feedback

title

string

The title of the feedback

authorName

string

The name of the feedback’s author

isVisible

bool

If true, the feedback is visible

createdAt

The date when the feedback was created

updatedAt

The date when the feedback was last updated

sourceRelation

FeedbackSourceRelation

The feedback source relation

Methods
public toArray()

Returns this model as an array.

FeedbackAverage

The feedback average model.

Namespace

Plenty\Modules\Feedback\Models

Properties
Name Type Description

id

int

The ID of the feedback average

feedbackRelationType

string

The feedback relation type

feedbackRelationTargetId

int

The feedback relation target ID

averageValue

float

The average value of the feedback

ratingsCountTotal

int

The total count of ratings for this target

ratingsCountOf1

int

Number of ratings of 1 for this target

ratingsCountOf2

int

Number of ratings of 2 for this target

ratingsCountOf3

int

Number of ratings of 3 for this target

ratingsCountOf4

int

Number of ratings of 4 for this target

ratingsCountOf5

int

Number of ratings of 5 for this target

createdAt

The date when the feedback average was created

updatedAt

The date when the feedback average was last updated

Methods
public toArray()

Returns this model as an array.

FeedbackComment

The feedback comment model.

Namespace

Plenty\Modules\Feedback\Models

Properties
Name Type Description

id

int

The ID of the comment

message

string

The message of the comment

isVisible

bool

If true, the comment is visible

createdAt

The date when the feedback relation type name was created

updatedAt

The date when the feedback relation type name was last updated

Methods
public toArray()

Returns this model as an array.

FeedbackCommentSourceRelation

The feedback comment source relation model.

Namespace

Plenty\Modules\Feedback\Models

Properties
Name Type Description

commentId

int

The ID of the feedback comment

commentRelationType

string

The relation comment relation type

commentRelationSourceId

int

The relation comment relation source ID

Methods
public toArray()

Returns this model as an array.

FeedbackCommentTargetRelation

The feedback comment target relation model.

Namespace

Plenty\Modules\Feedback\Models

Properties
Name Type Description

commentId

int

The ID of the feedback comment

commentRelationType

string

The relation comment relation type

commentRelationTargetId

int

The relation comment relation target ID

Methods
public toArray()

Returns this model as an array.

FeedbackLegacy

The feedback legacy model.

Namespace

Plenty\Modules\Feedback\Models

Properties
Name Type Description

feedbackId

int

The ID of the new feedback

legacyFeedbackId

int

The ID of the legacy feedback

createdAt

The date when the legacy feedback was created

updatedAt

The date when the legacy feedback was last updated

Methods
public toArray()

Returns this model as an array.

FeedbackRating

The feedback rating model.

Namespace

Plenty\Modules\Feedback\Models

Properties
Name Type Description

id

int

The ID of the rating

ratingValue

string

The value of the rating

isVisible

bool

If true, the rating is visible

createdAt

The date when the feedback rating relation type name was created

updatedAt

The date when the feedback rating relation type name was last updated

Methods
public toArray()

Returns this model as an array.

FeedbackRatingAverage

The feedback rating average model.

Namespace

Plenty\Modules\Feedback\Models

Properties
Name Type Description

id

int

The ID of the feedback rating average

ratingRelationType

string

The feedback rating relation type

ratingRelationTargetId

int

The feedback rating relation target ID

averageValue

float

The average value of the feedback rating

averageCount

int

The average count of the feedback rating

createdAt

The date when the feedback rating average was created

updatedAt

The date when the feedback rating average was last updated

Methods
public toArray()

Returns this model as an array.

FeedbackRatingSourceRelation

The feedback rating source relation model.

Namespace

Plenty\Modules\Feedback\Models

Properties
Name Type Description

ratingId

int

The ID of the feedback rating

ratingRelationType

string

The rating relation type

ratingRelationSourceId

int

The rating relation source ID

Methods
public toArray()

Returns this model as an array.

FeedbackRatingTargetRelation

The feedback rating target relation model.

Namespace

Plenty\Modules\Feedback\Models

Properties
Name Type Description

ratingId

int

The ID of the feedback rating

ratingRelationType

string

The relation rating relation type

ratingRelationTargetId

int

The relation rating relation target ID

Methods
public toArray()

Returns this model as an array.

FeedbackSourceRelation

The feedback source relation model.

Namespace

Plenty\Modules\Feedback\Models

Properties
Name Type Description

feedbackId

int

The ID of the feedback

feedbackRelationType

string

The relation type

feedbackRelationSourceId

int

The relation source ID

sourceRelationLabel

string

The source relation label

sourceRelationTypeLabel

string

The source relation type label

Methods
public toArray()

Returns this model as an array.

FeedbackTargetRelation

The feedback target relation model.

Namespace

Plenty\Modules\Feedback\Models

Properties
Name Type Description

feedbackId

int

The ID of the feedback

feedbackRelationType

string

The relation type

feedbackRelationSourceId

int

The relation source ID

targetRelationLabel

string

The target relation label

targetRelationName

string

The target relation name

Methods
public toArray()

Returns this model as an array.