Feedback

Contracts

FeedbackAverageRepositoryContract

Get the feedback average.

Namespace

Plenty\Modules\Feedback\Contracts

Methods

public getFeedbackAverage(int $feedbackRelationTargetId):void

Gets the feedback average

Parameters
int $feedbackRelationTargetId
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(array $filters = []):void

Sets the filter array.

Parameters
array $filters
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(int $feedbackCommentId):FeedbackComment

Get a feedback comment

Parameters
int $feedbackCommentId The ID of the feedback comment
public listFeedbackComments():Collection

List feedback comments

public createFeedbackComment(array $data):FeedbackComment

Create a feedback comment

Parameters
array $data The request data
public deleteFeedbackComment(int $feedbackCommentId):void

Delete a feedback comment

Parameters
int $feedbackCommentId 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(array $filters = []):void

Sets the filter array.

Parameters
array $filters
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(int $feedbackRatingId):FeedbackRating

Get a feedback rating

Parameters
int $feedbackRatingId The ID of the feedback rating
public listFeedbackRatings():Collection

List feedback ratings

public createFeedbackRating(array $data):FeedbackRating

Create a feedback rating

Parameters
array $data The request data
public deleteFeedbackRating(int $feedbackRatingId):void

Delete a feedback rating

Parameters
int $feedbackRatingId 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(array $filters = []):void

Sets the filter array.

Parameters
array $filters
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(int $feedbackId):void

Get a feedback

Parameters
int $feedbackId The ID of the feedback
public listFeedbacks(int $page = 1, int $itemsPerPage = 50, array $with = [], array $filters = []):PaginatedResult
Parameters
int $page
int $itemsPerPage
array $with
array $filters
public createFeedback(array $data):void

Create a feedback

Parameters
array $data The request data
public deleteFeedback(int $feedbackId):void

Delete a feedback

Parameters
int $feedbackId The ID of the feedback
public updateFeedback(array $data, int $feedbackId):void

Update a feedback

Parameters
array $data Request data
int $feedbackId The ID of the feedback
public updateFeedbacksVisibility(array $feedbackIds, bool $isVisible):void

Update the visibility of multiple feedbacks

Parameters
array $feedbackIds
bool $isVisible
public deleteFeedbacks(string $feedbackIds):void

Delete multiple feedbacks

Parameters
string $feedbackIds
public listFeedbackReplies(int $feedbackId, int $page = 1, int $itemsPerPage = 50, array $with = [], array $filters = []):void

Lists feedback replies

Parameters
int $feedbackId
int $page
int $itemsPerPage
array $with
array $filters
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(array $filters = []):void

Sets the filter array.

Parameters
array $filters
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

Type Name Description
int id The ID of the feedback
string title The title of the feedback
string authorName The name of the feedback's author
bool isVisible If true, the feedback is visible
createdAt The date when the feedback was created
updatedAt The date when the feedback was last updated
FeedbackSourceRelation sourceRelation The feedback source relation

Methods

public toArray()

Returns this model as an array.

FeedbackAverage

The feedback average model.

Namespace

Plenty\Modules\Feedback\Models

Properties

Type Name Description
int id The ID of the feedback average
string feedbackRelationType The feedback relation type
int feedbackRelationTargetId The feedback relation target ID
float averageValue The average value of the feedback
int ratingsCountTotal The total count of ratings for this target
int ratingsCountOf1 Number of ratings of 1 for this target
int ratingsCountOf2 Number of ratings of 2 for this target
int ratingsCountOf3 Number of ratings of 3 for this target
int ratingsCountOf4 Number of ratings of 4 for this target
int ratingsCountOf5 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

Type Name Description
int id The ID of the comment
string message The message of the comment
bool isVisible 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

Type Name Description
int commentId The ID of the feedback comment
string commentRelationType The relation comment relation type
int commentRelationSourceId 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

Type Name Description
int commentId The ID of the feedback comment
string commentRelationType The relation comment relation type
int commentRelationTargetId 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

Type Name Description
int feedbackId The ID of the new feedback
int legacyFeedbackId 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

Type Name Description
int id The ID of the rating
string ratingValue The value of the rating
bool isVisible 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

Type Name Description
int id The ID of the feedback rating average
string ratingRelationType The feedback rating relation type
int ratingRelationTargetId The feedback rating relation target ID
float averageValue The average value of the feedback rating
int averageCount 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

Type Name Description
int ratingId The ID of the feedback rating
string ratingRelationType The rating relation type
int ratingRelationSourceId 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

Type Name Description
int ratingId The ID of the feedback rating
string ratingRelationType The relation rating relation type
int ratingRelationTargetId 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

Type Name Description
int feedbackId The ID of the feedback
string feedbackRelationType The relation type
int feedbackRelationSourceId The relation source ID
string sourceRelationLabel The source relation label
string sourceRelationTypeLabel 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

Type Name Description
int feedbackId The ID of the feedback
string feedbackRelationType The relation type
int feedbackRelationSourceId The relation source ID
string targetRelationLabel The target relation label
string targetRelationName The target relation name

Methods

public toArray()

Returns this model as an array.