Log in
Model

Option

Magento\Review\Model\ResourceModel\Rating\Option

What it does

This resource model manages rating options for product reviews in Magento 2.

Developers use it to record customer votes on ratings, calculate aggregate rating statistics per store, and maintain rating vote data in the database.

It handles both creating new votes and updating existing ones while automatically computing percentage scores and aggregated values.

Public Methods

  • addVote()
  • aggregate()
  • aggregateEntityByRatingId()
  • loadDataById()