Download the PHP package elephantsgroup/eg-star-rating without Composer
On this page you can find all versions of the php package elephantsgroup/eg-star-rating. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download elephantsgroup/eg-star-rating
More information about elephantsgroup/eg-star-rating
Files in elephantsgroup/eg-star-rating
Informations about the package eg-star-rating
To use Elephants Group star-rating module first you must install module, then you can use star-rating widget anywhere in your website.
Installation Steps:
1) run
php composer.phar require elephantsgroup/eg-star-rating "*"
or add "elephantsgroup/eg-star-rating": "~1"
to the require section of your composer.json file.
2) migrate database
yii migrate --migrationPath=vendor/elephantsgroup/eg-star-rating/migrations
3) add star-rating module to common configuration (common/config.php file)
4) open access to module in common configuration
5) filter admin controller in frontend configuration (frontend/config.php file)
5) filter ajax controller in backend configuration (backend/config.php file)
Using star-rating widget
Anywhere in your code you can use star-rating widget as follows:
You need to use Rate widget header in your page:
Rate widget parameters
- item (integer): to separate Rate between different items.
default value for item is 0
- service (integer): to separate star-rating between various item types.
for example you can use different values for different modules in your app, and then use star-rating widget separately in modules. default value for service is 0
-
min_num (integer): minimum possible rate vote
-
max_num (integer): maximum possible rate vote
- view_file (string): the view file path for rendering
you can use these variables in your customized view:
- service
- item
- min_num
- max_num
- rate_num