CommentStars class

Class CommentStars

Handles rendering of star ratings for comments. Additional code in comments.js and comments.css accompanies this.

Copyright 2016 by Ryan Cramer for ProcessWire


Click any linked item for full usage details and examples. Hookable methods are indicated with the icon. In addition to those shown below, the CommentStars class also inherits all the methods and properties of: WireData and Wire.

Show class?     Show args?       Only hookable?    

Properties

NameReturnSummary 
CommentStars::countClass string Class used for the renderCount() method 
CommentStars::countLabelPlural string Plural count label 
CommentStars::countLabelSingular string Single count label 
CommentStars::detailsLabel string Star details label 
CommentStars::numStars int Max number of stars 
CommentStars::star string Default star output (can be overridden with HTML) 
CommentStars::starClass string Class for stars whether on or off 
CommentStars::starOff string Optionally use this star/HTML for OFF state 
CommentStars::starOffClass string Class for inactive/off stars 
CommentStars::starOn string Optionally use this star/HTML for ON state 
CommentStars::starOnClass string Class for active/on stars 
CommentStars::starPartialClass string Class for partial (half lit star) 
CommentStars::unratedLabel string Unrated label 
CommentStars::wrapClass string Wrapping element class, required for JS and CSS 
CommentStars::wrapClassInput string Wrapping input element class, required for JS and CSS 

Additional methods and properties

In addition to the methods and properties above, CommentStars also inherits the methods and properties of these classes:

API reference based on ProcessWire core version 3.0.252